DecodingError
An error occurred while decoding a document field.
@frozen struct DecodingError<Location> where Location : SendableAn error occurred while decoding a document field.
@frozen struct DecodingError<Location> where Location : Sendableimport BSONABIModels the BSON type system and the binary interface of the BSON serialization format.
import BSONDecodingImplements the BSON decoding system.
@frozen enum BSONThe namespace for all BSON types.
protocol Sendableprotocol TracingDecoderA type that represents a scope for decoding operations.
@frozen struct BinaryDecoder@frozen struct BinaryTypecastErrorA list had an invalid number of elements.
@frozen struct DocumentDecoder<CodingKey> where CodingKey : Hashable, CodingKey : RawRepresentable, CodingKey : Sendable, CodingKey.RawValue == StringA thin wrapper around a native Swift dictionary providing an efficient decoding interface for a Document.
@frozen enum DocumentKeyError<Key> where Key : SendableA document had an invalid key scheme.
@frozen struct FieldAccessor<Key> where Key : SendableA field that may or may not exist in a document. This type is the return value of DocumentDecoder’s non-optional subscript, and is useful for obtaining structured diagnostics for “key-not-found” scenarios.
@frozen struct FieldDecoder<Key> where Key : SendableA field that is already known to exist in a document. This type is the return value of DocumentDecoder’s optional subscript.
@frozen struct KeyspaceDecoder<Key>@frozen struct KeyspaceErrorAn error that is thrown when a key cannot be mapped to a keyspace.
@frozen struct ListDecoderAn iterable type that produces this list’s elements, with associated indices. Parsing a list is slightly faster than parsing a general Document, because this method ignores the document keys.
@frozen enum SingleKeyError<CodingKey>@frozen struct ValueError<Value, Cases> where Value : SendableA decoder successfully to cast a variant to an expected value type, but it was not a valid case of the expected destination type.
protocol Error : SendableA type representing an error value that can be thrown.
init(_ underlying: any Error, in location: Location) let location: LocationThe location (key or index) where the error occurred.
let underlying: any ErrorThe underlying error that occurred.
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 protocol EquatableA type that can be compared for value equality.
protocol CopyableA type whose values can be implicitly or explicitly copied.
protocol Escapablestatic func == (a: Self, b: Self) -> Bool Compares the location properties and the underlying errors of the operands for equality, returning true if they are equal. Always returns false if (any of) the underlying Error existentials are not Equatable.
static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol TraceableError : CustomStringConvertible, ErrorA link in a propogated error.
var description: String { get }var notes: [String] { get }Returns a single note that says "while decoding value for field '_'.