subscript(_:at:)
Fetch a single Decodable
value at the supplied keypath in the container.
subscript<D>(_: D.Type = D.self, at path: [CodingKeyRepresentable]) -> D? where D : Decodable { get }
let name: String? = req.query[at: ["user", "name"]]
Fetch a single Decodable
value at the supplied keypath in the container.
subscript<D>(_: D.Type = D.self, at path: [CodingKeyRepresentable]) -> D? where D : Decodable { get }
s5Vapor17URLQueryContainerPAAE_2atqd__Sgqd__m_Says22CodingKeyRepresentable_pGtcSeRd__luip
What are these?1D8A3
let name: String? = req.query[at: ["user", "name"]]
import Vapor
Vapor 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 URLQueryContainer
Helper for encoding and decoding data from an HTTP request query string.
protocol Decodable
A type that can decode itself from an external representation.
typealias CodingKeyRepresentable = Swift.CodingKeyRepresentable
subscript<D>(path: CodingKeyRepresentable...) -> D? where D : Decodable { get }
Legacy alias for subscript(_:at:)-26w0c
.
subscript<D>(_: D.Type = D.self, at path: CodingKeyRepresentable...) -> D? where D : Decodable { get }
Fetch a single Decodable
value at the supplied keypath in the container.
func decode<C>(_ content: C.Type) throws -> C where C : Content
Parse a Content
object from the container.
func decode<D>(_: D.Type) throws -> D where D : Decodable
Parse a Decodable
value from the container.
mutating func encode<C>(_ content: C) throws where C : Content
Serialize a Content
object to the container.
mutating func encode<E>(_ encodable: E) throws where E : Encodable
Serialize an Encodable
value to the container.
mutating func encode<C>(_ content: inout C) throws where C : Content
Serialize a Content
object to the container without copying it.
func get<D>(_: D.Type = D.self, at path: [CodingKeyRepresentable]) throws -> D where D : Decodable
Fetch a single Decodable
value at the supplied keypath in this container.
func get<D>(_: D.Type = D.self, at path: CodingKeyRepresentable...) throws -> D where D : Decodable
Fetch a single Decodable
value at the supplied keypath in the container.