Instance Methodswift-bson 0.3.1BSONEncoding->BSONABI
encode(to:)
BSON.Document (ext).swift:4func encode(to field: inout BSON.FieldEncoder)
func encode(to field: inout BSON.FieldEncoder)
s7BSONABI4BSONO8DocumentV12BSONEncodingE6encode2toyAC12FieldEncoderVz_tF
What are these?9XC9S
import BSONEncoding
import BSONABI
Models the BSON type system and the binary interface of the BSON serialization format.
@frozen struct Document
The Document
type models the “universal” BSON DSL.
@frozen enum BSON
The namespace for all BSON types.
@frozen struct FieldEncoder
A type that can serialize any BSON container element.
init<CodingKey>(_: CodingKey.Type = CodingKey.self, with encode: (inout BSON.DocumentEncoder<CodingKey>) throws -> ()) rethrows where CodingKey : RawRepresentable, CodingKey.RawValue == String
init<Encodable>(encoding fields: some Sequence<(key: BSON.Key, value: Encodable)>) where Encodable : BSONEncodable
init(encoding encodable: some BSONDocumentEncodable)
subscript<CodingKey>(_: CodingKey.Type) -> BSON.DocumentEncoder<CodingKey> where CodingKey : RawRepresentable, CodingKey.RawValue == String { mutating get set }
subscript(with key: some RawRepresentable<String>) -> BSON.FieldEncoder { get set }