Array (ext)
You’re viewing third-party extensions to Array, a struct from the Swift standard library.
You can also read the documentation forArray itself.
extension ArrayYou’re viewing third-party extensions to Array, a struct from the Swift standard library.
You can also read the documentation forArray itself.
extension Array@frozen struct Array<Element>An ordered, random-access collection.
import 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.
protocol Content : Decodable, Encodable, Sendable, AsyncRequestDecodable, AsyncResponseEncodable, RequestDecodable, ResponseEncodableConvertible to / from content in an HTTP message.
protocol AsyncRequestDecodableCan convert Request to a Self.
protocol AsyncResponseEncodableCan convert self to a Response.
protocol RequestDecodableCan convert Request to a Self.
protocol ResponseEncodableCan convert self to a Response.
static var defaultContentType: HTTPMediaType { get }static var defaultContentType: HTTPMediaType { get }static func decodeRequest(_ request: Request) -> EventLoopFuture<Self> static func decodeRequest(_ request: Request) async throws -> Self mutating func afterDecode() throws mutating func beforeEncode() throws func encodeResponse(for request: Request) -> EventLoopFuture<Response> func encodeResponse(for request: Request) async throws -> Response func encodeResponse(status: HTTPStatus, headers: HTTPHeaders = [:], for request: Request) -> EventLoopFuture<Response> Asynchronously encodes Self into a Response, setting the supplied status and headers.
func encodeResponse(status: HTTPStatus, headers: HTTPHeaders = [:], for request: Request) async throws -> Response Asynchronously encodes Self into a Response, setting the supplied status and headers.
protocol FixedWidthInteger : BinaryInteger, LosslessStringConvertible where Self.Magnitude : FixedWidthInteger, Self.Magnitude : UnsignedInteger, Self.Stride : FixedWidthInteger, Self.Stride : SignedIntegerAn integer type that uses a fixed size for every instance.
static func random(count: Int) -> [Element] static func random<T>(count: Int, using generator: inout T) -> [Element] where T : RandomNumberGenerator @preconcurrency protocol Middleware : SendableMiddleware is placed between the server and your router. It is capable of mutating both incoming requests and outgoing responses. Middleware can choose to pass requests on to the next Middleware in a chain, or they can short circuit and return a custom Response if desired.
func makeResponder(chainingTo responder: Responder) -> Responder Wraps a Responder in an array of Middleware creating a new Responder.
struct HTTPMediaTypePreferenceRepresents a MediaType and its associated preference, q.
var mediaTypes: [HTTPMediaType] { get }Returns all MediaTypes in this array of MediaTypePreference.
func comparePreference(for a: HTTPMediaType, to b: HTTPMediaType) -> ComparisonResult Returns ComparisonResult comparing the supplied MediaTypes against these preferences.
@frozen struct UInt8An 8-bit unsigned integer value type.
init?(decodingBase32 str: String) Decode a string in canonical Base32-encoded representation.
init?<C>(decodingBase32 bytes: C) where C : RandomAccessCollection, C.Element == UInt8, C.Index == Int init?(decodingBase64 str: String) Decode a string in canonical Base32-encoded representation.
init?<C>(decodingBase64 bytes: C) where C : RandomAccessCollection, C.Element == UInt8, C.Index == Int init?(decodingBcryptBase64 str: String) Decode a string in Bcrypt-flavored Base64-encoded representation.
init?<C>(decodingBcryptBase64 bytes: C) where C : RandomAccessCollection, C.Element == UInt8, C.Index == Int var base64: String { get }protocol CodingKey : CustomDebugStringConvertible, CustomStringConvertible, SendableA type that can be used as a key for encoding and decoding.
var dotPath: String { get }