Instance Method (Default implementation)swift-bson 0.3.1BSONEncoding
encode(to:)
BSONDocumentEncodable.swift:24func encode(to field: inout BSON.FieldEncoder)
func encode(to field: inout BSON.FieldEncoder)
s12BSONEncoding21BSONDocumentEncodablePAAE6encode2toy7BSONABI4BSONO12FieldEncoderVz_tF
What are these?6EUFN
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
.
@frozen enum BSON
The namespace for all BSON types.
@frozen struct FieldEncoder
A type that can serialize any BSON container element.
func encode(to field: inout BSON.FieldEncoder)
func encode(to bson: inout BSON.DocumentEncoder<CodingKey>)
Creates a document from this instance by encoding to the parameter.