Required Instance Methodhummingbird 2.15.0Hummingbird
decode(_:from:context:)
Decode Swift object from Request
func decode<T>(_ type: T.Type, from request: Request, context: some RequestContext) async throws -> T where T : Decodable
Decode Swift object from Request
func decode<T>(_ type: T.Type, from request: Request, context: some RequestContext) async throws -> T where T : Decodable
s11Hummingbird14RequestDecoderP6decode_4from7contextqd__qd__m_0A4Core0B0Vqd_0_tYaKSeRd__AA0B7ContextRd_0_r0_lF
What are these?2YBN4
import Hummingbird
protocol RequestDecoder
protocol for decoder deserializing from a Request body
struct Request
Holds all the values required to process a request
protocol RequestContext : InitializableFromSource, RequestContextSource where Self.Source : RequestContextSource
Protocol that all request contexts should conform to. A RequestContext is a statically typed metadata container for information that is associated with a Request
, and is therefore instantiated alongside the request.
protocol Decodable
A type that can decode itself from an external representation.