Required Associated Typeswift-bson 0.3.1BSONEncoding
CodingKey
BSONDocumentEncodable.swift:11associatedtype CodingKey : RawRepresentable = BSON.Key where Self.CodingKey.RawValue == String
associatedtype CodingKey : RawRepresentable = BSON.Key where Self.CodingKey.RawValue == String
import BSONEncoding
protocol BSONDocumentEncodable<CodingKey> : BSONEncodable
A type that can be encoded to a BSON document. This protocol exists to allow types that define CodingKey
to encode themselves using a BSON.DocumentEncoder
.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
@frozen enum BSON
The namespace for all BSON types.
@frozen struct Key
A BSON field key. This type wraps a rawValue
that is guaranteed to never contain null bytes. (Null bytes in a BSON field key can be exploited to perform SQL injection.)
associatedtype RawValue
The raw type that can be used to represent all values of the conforming type.
@frozen struct String
A Unicode string value that is a collection of characters.
func encode(to bson: inout BSON.DocumentEncoder<CodingKey>)
Creates a document from this instance by encoding to the parameter.