BinarySubtypeError
The subtype byte of a binary array matched a reserved bit pattern.
@frozen struct BinarySubtypeErrorThe subtype byte of a binary array matched a reserved bit pattern.
@frozen struct BinarySubtypeErrorimport BSONABIModels the BSON type system and the binary interface of the BSON serialization format.
@frozen enum BSONThe namespace for all BSON types.
protocol BufferFrame : BSON.BufferFrameTypeA type that augments a BufferFrameType conformance with a BSON metatype value. This is a derived protocol because it is sometimes useful to repurpose the BSON frame parsing machinery for additional (fictional) frame types that never appear in BSON data.
protocol BufferFrameTypeA type that specifies the layout of a variable-length BSON view. Parsers use conforming types to decide how to interpret BSON length headers read from input data.
protocol BufferTraversableA framed type that BSON parsers can traverse in constant time.
protocol Decoderprotocol Encoder<Frame>protocol Keyspace : RawRepresentable, Sendable where Self.RawValue == StringA keyspace is a type that is used to identify an arbitrary associative mapping within a BSON.Document. Keyspaces are not the same as schema keys, which are a fixed (but evolving) set of names that are used to identify structural properties in a model type.
protocol OutputStream@frozen enum AnyTypeA BSON metatype. The raw value of this enumeration is the type code of the associated case in BSON’s ABI.
@frozen enum AnyValueAny BSON value.
@frozen struct BinaryBuffer<Element> where Element : BitwiseCopyableA BinaryBuffer is a typed view of an ArraySlice as a densely-packed buffer of trivial Elements. It’s a good idea to use something unpretentious like a tuple of fixed-width integers for the Element type, to avoid unexpected padding behavior.
@frozen enum BinaryFrameSpecifies the interpretation of a length header attached to a binary array.
@frozen struct BinaryShapeAn efficient interface for checking the shape of a binary array at run time.
@frozen struct BinaryShapeErrorA binary array had an invalid number of bytes.
@frozen struct BinarySubtypeA BSON binary metatype. This type’s public API performs canonicalization and therefore instances of this type are safe to compare.
@frozen struct BinaryView<Bytes> where Bytes : RandomAccessCollection, Bytes.Element == UInt8A BSON binary array.
@frozen struct BinaryViewErrorA binary view was sliced from a malformed storage buffer.
@frozen struct BooleanSubtypeErrorA byte encoding a boolean value was not 0 or 1.
@frozen struct Decimal128An opaque IEEE 754-2008 decimal.
@frozen struct DocumentThe Document type models the “universal” BSON DSL.
@frozen enum DocumentFrameSpecifies the interpretation of a length header attached to a document, or a list document.
@frozen enum EndIndexA syntactical abstraction used to express the “end index” of a list or document. This type has no inhabitants.
@frozen struct FieldEncoderA type that can serialize any BSON container element.
@frozen struct HeaderError<Frame> where Frame : BSON.BufferFrameType@frozen struct IdentifierA MongoDB object reference. This type models a MongoDB ObjectId.
@frozen struct InputA type for managing BSON parsing state. Most users of this library should not need to interact with it directly.
@frozen struct InputErrorA parser did not receive the expected amount of input.
@frozen enum IntegerOverflowError<Overflowed> where Overflowed : FixedWidthIntegerAn overflow occurred while casting an integer value to a desired type.
@frozen struct KeyA 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.)
@frozen struct List@frozen struct MaxThe MongoDB max-key. This type has a single state, and is isomorphic to Void. It is mainly used by the decoding and encoding layers as an API landmark.
@frozen struct MinThe MongoDB min-key. This type has a single state, and is isomorphic to Void. It is mainly used by the decoding and encoding layers as an API landmark.
@frozen struct Null@frozen struct OutputA type for serializing raw BSON tokens. This is used to implement BSON DSLs, and most users of this library should not need to interact with it directly.
@frozen struct RegexA MongoDB regex.
@frozen struct Timestamp@frozen struct TypeErrorA variant code did not encode a valid BSON type.
@frozen struct TypecastError<Value>A decoder failed to cast a variant to an expected value type.
@frozen enum UTF8FrameSpecifies the interpretation of a length header attached to UTF-8 string.
@frozen struct UTF8View<Bytes> where Bytes : BidirectionalCollection, Bytes.Element == UInt8A BSON UTF-8 string. This string is allowed to contain null bytes.
protocol BitwiseCopyableprotocol CopyableA type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol EquatableA type that can be compared for value equality.
protocol Error : SendableA type representing an error value that can be thrown.
protocol Escapableprotocol Sendableinit(invalid code: UInt8) let code: UInt8var description: String { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
import BSONAn umbrella module providing a BSON parser, encoder, and decoder.
static func == (lhs: Self, rhs: any Error) -> Bool func headline(plaintext: Bool = true) -> String