enum AnyType
A BSON metatype. The raw value of this enumeration is the type code of the associated case in BSON’s ABI.
enum AnyValue
Any BSON value.
struct BinaryBuffer<Element>
A BinaryBuffer
is a typed view of an ArraySlice
as a densely-packed buffer of trivial Element
s. 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.
enum BinaryFrame
Specifies the interpretation of a length header attached to a binary
array.
struct BinarySubtype
A BSON binary metatype. This type’s public API performs canonicalization and therefore instances of this type are safe to compare.
struct BinarySubtypeError
The subtype byte of a binary array matched a reserved bit pattern.
struct BinaryView<Bytes>
A BSON binary array.
struct BinaryViewError
A binary view was sliced from a malformed storage buffer.
struct BooleanSubtypeError
A byte encoding a boolean value was not 0
or 1
.
struct Decimal128
An opaque IEEE 754-2008 decimal.
struct Document
The Document
type models the “universal” BSON DSL.
enum DocumentFrame
Specifies the interpretation of a length header attached to a document
, or a list
document.
struct FieldEncoder
A type that can serialize any BSON container element.
struct Identifier
A MongoDB object reference. This type models a MongoDB ObjectId
.
struct Input
A type for managing BSON parsing state. Most users of this module should not need to interact with it directly.
struct InputError
A parser did not receive the expected amount of input.
enum IntegerOverflowError<Overflowed>
An overflow occurred while casting an integer value to a desired type.
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.)
struct List
struct Max
The 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.
struct Min
The 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.
struct Null
struct Output
struct Regex
A MongoDB regex.
struct Shape
An efficient interface for checking the shape of a list or binary array at run time.
struct ShapeError
A list had an invalid number of elements or a binary array had an invalid number of bytes.
struct Timestamp
struct TypeError
A variant code did not encode a valid BSON type.
struct TypecastError<Value>
A decoder failed to cast a variant to an expected value type.
enum UTF8Frame
Specifies the interpretation of a length header attached to UTF-8 string
.
struct UTF8View<Bytes>
A BSON UTF-8 string. This string is allowed to contain null bytes.