Instance Propertyswift-bson 0.3.1BSONABI
key
BSON.FieldEncoder.swift:10let key: Key
let key: Key
import BSONABI
Models the BSON type system and the binary interface of the BSON serialization format.
@frozen struct FieldEncoder
A type that can serialize any BSON container element.
@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.)
init(key: Key, output: BSON.Output)
var output: BSON.Output
subscript<Encoder>(as _: Encoder.Type = Encoder.self) -> Encoder where Encoder : BSON.Encoder { mutating get set }
Writes the stored type code and key
to the output buffer, temporarily rebinds the output’s storage buffer to an encoder of the specified type, and brackets any newly-written bytes with the appropriate headers or trailers.
mutating func encode(binary: BSON.BinaryView<some RandomAccessCollection<UInt8>>)
mutating func encode(bool: Bool)
mutating func encode(decimal128: BSON.Decimal128)
mutating func encode(document: BSON.Document)
mutating func encode(double: Double)
mutating func encode(id: BSON.Identifier)
mutating func encode(int32: Int32)
mutating func encode(int64: Int64)
mutating func encode(javascript: BSON.UTF8View<some BidirectionalCollection<UInt8>>)
mutating func encode(list: BSON.List)
mutating func encode(max: BSON.Max)
mutating func encode(millisecond: UnixMillisecond)
mutating func encode(min: BSON.Min)
mutating func encode(null: BSON.Null)
mutating func encode(regex: BSON.Regex)
mutating func encode(string: BSON.UTF8View<some BidirectionalCollection<UInt8>>)
mutating func encode(timestamp: BSON.Timestamp)