Protocol
ResponseEncodable
Can convert
self to a Response.protocol ResponseEncodable : Sendable
Overview
Types that conform to this protocol can be returned in route closures.
Topics
Instance Methods
func encodeResponse(for: Request) async throws -> ResponseEncodes an instance ofSelfto aResponse.func encodeResponse(status: HTTPResponse.Status, headers: HTTPFields, for: Request) async throws -> ResponseAsynchronously encodesSelfinto aResponse, setting the supplied status and headers.
Relationships
Inherits From
Swift.SendableSwift.SendableMetatype
Inherited By
Conforming Types
AnyResponseArrayBoolClientResponseDictionaryDoubleFloatHTTPResponse.StatusIntInt16Int32Int64Int8ResponseStaticStringStringUIntUInt16UInt32UInt64UInt8View