Protocol
ContentContainer
protocol ContentContainer
Topics
Instance Properties
var contentType: HTTPMediaType?The type of data stored in the container.
Instance Methods
func decode(_:)Use the default decoder for the container’scontentTypeto read a value of typeCfrom the container.func decode<D>(D.Type, as: HTTPMediaType) throws -> DUse the default configured decoder for thecontentTypeparameter to read a value of typeDfrom the container.func decode<D>(D.Type, using: any ContentDecoder) throws -> DUse the providedContentDecoderto read a value of typeDfrom the container.func encode(_:)Serialize aContentobject to the container as its default content type.func encode(_:as:)Serialize aContentobject to the container, specifying an explicit content type.func encode<E>(E, using: any ContentEncoder) throwsUse the providedContentEncoderto write a value of typeEto the container.func get(_:at:)Fetch a singleDecodablevalue at the supplied keypath in this container.
Subscripts
subscript<D>(any CodingKeyRepresentable...) -> D?Legacy alias forsubscript(_:at:)-90mrm.subscript(_:at:)Fetch a singleDecodablevalue at the supplied keypath in the container.