Scheme
A URI scheme, as defined by RFC 3986 § 3.1 and [RFC 7595].
struct SchemeA URI scheme, as defined by RFC 3986 § 3.1 and [RFC 7595].
struct Schemeimport VaporVapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct URIA type for constructing and manipulating (most) Uniform Resource Indicators.
init(from decoder: any Decoder) throws init(scheme: Scheme = .init(), host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil) init(scheme: String?, host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil) init(scheme: Scheme = .init(), userinfo: String?, host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil) Construct a URI from various subcomponents.
init(scheme: String?, userinfo: String?, host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil) init(string: String = "/") Create a URI by parsing a given string according to the semantics of RFC 3986.
init(stringLiteral value: String) var description: String { get }var fragment: String? { get set }var host: String? { get set }var path: String { get set }var port: Int? { get set }var query: String? { get set }var scheme: String? { get set }var string: String { get }var userinfo: String? { get set }func encode(to encoder: any Encoder) throws protocol CustomStringConvertibleA type with a customized textual representation.
protocol DecodableA type that can decode itself from an external representation.
protocol EncodableA type that can encode itself to an external representation.
protocol EquatableA type that can be compared for value equality.
protocol ExpressibleByExtendedGraphemeClusterLiteral : ExpressibleByUnicodeScalarLiteralA type that can be initialized with a string literal containing a single extended grapheme cluster.
protocol ExpressibleByStringInterpolation : ExpressibleByStringLiteralA type that can be initialized by string interpolation with a string literal that includes expressions.
protocol ExpressibleByStringLiteral : ExpressibleByExtendedGraphemeClusterLiteralA type that can be initialized with a string literal.
protocol ExpressibleByUnicodeScalarLiteralA type that can be initialized with a string literal containing a single Unicode scalar value.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol Sendableinit(_ value: String? = nil) Designated initializer.
init(from decoder: any Decoder) throws init(stringLiteral value: String) static let http: SelfHyperText Transfer Protocol (HTTP)
static let httpUnixDomainSocket: SelfHyperText Transfer Protocol (HTTP) over Unix Domain Sockets.
static let https: SelfSecure HyperText Transfer Protocol (HTTPS)
static let httpsUnixDomainSocket: SelfSecure HyperText Transfer Protocol (HTTPS) over Unix Domain Sockets.
var description: String { get }let value: String?The string representation of the scheme.
init(extendedGraphemeClusterLiteral value: Self.StringLiteralType) init(stringInterpolation: DefaultStringInterpolation) Creates a new instance from an interpolated string literal.
init(unicodeScalarLiteral value: Self.ExtendedGraphemeClusterLiteralType) static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.