Files
Cory Benfield 27e163f96a Rename a number of types and modules. (#13)
Motivation:

In general we should try to be specific about what we're referring to.
"Structured headers" is not really an accurate description of what this
module works with: "Structured Header Field Values", or "Structured
Field Value" is usually better. To that end this change adjusts our
naming to be closer to what we want. It also changes our module names to
prioritise the use of the Codable-based one.

Modifications:

- Renamed CodableStructuredHeaders to StructuredFieldValues.
- Renamed StructuredHeaders to RawStructuredFieldValues.
- Renamed a number of types from Field to FieldValue.
- Renamed a number of types from Header to Field or FieldValue.
- Renamed some functions along the above lines.

Result:

Better and more consistent terminology will be used.
2021-07-02 11:48:41 +01:00

52 lines
1.9 KiB
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
let asciiSpace = UInt8(ascii: " ")
let asciiTab = UInt8(ascii: "\t")
let asciiOpenParenthesis = UInt8(ascii: "(")
let asciiCloseParenthesis = UInt8(ascii: ")")
let asciiDash = UInt8(ascii: "-")
let asciiUnderscore = UInt8(ascii: "_")
let asciiZero = UInt8(ascii: "0")
let asciiOne = UInt8(ascii: "1")
let asciiNine = UInt8(ascii: "9")
let asciiDigits = asciiZero ... asciiNine
let asciiDquote = UInt8(ascii: "\"")
let asciiColon = UInt8(ascii: ":")
let asciiSemicolon = UInt8(ascii: ";")
let asciiBackslash = UInt8(ascii: "\\")
let asciiQuestionMark = UInt8(ascii: "?")
let asciiExclamationMark = UInt8(ascii: "!")
let asciiOctothorpe = UInt8(ascii: "#")
let asciiDollar = UInt8(ascii: "$")
let asciiPercent = UInt8(ascii: "%")
let asciiAmpersand = UInt8(ascii: "&")
let asciiSquote = UInt8(ascii: "'")
let asciiCaret = UInt8(ascii: "^")
let asciiBacktick = UInt8(ascii: "`")
let asciiPipe = UInt8(ascii: "|")
let asciiTilde = UInt8(ascii: "~")
let asciiAsterisk = UInt8(ascii: "*")
let asciiEqual = UInt8(ascii: "=")
let asciiPlus = UInt8(ascii: "+")
let asciiSlash = UInt8(ascii: "/")
let asciiPeriod = UInt8(ascii: ".")
let asciiComma = UInt8(ascii: ",")
let asciiCapitalA = UInt8(ascii: "A")
let asciiCapitalZ = UInt8(ascii: "Z")
let asciiLowerA = UInt8(ascii: "a")
let asciiLowerZ = UInt8(ascii: "z")
let asciiCapitals = asciiCapitalA ... asciiCapitalZ
let asciiLowercases = asciiLowerA ... asciiLowerZ