Enum bson::ser::Error [−][src]
#[non_exhaustive]
pub enum Error {
Io(Arc<Error>),
InvalidDocumentKey(Bson),
SerializationError {
message: String,
},
UnsupportedUnsignedInteger(u64),
}Expand description
Possible errors that can arise during encoding.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
A std::io::Error encountered while serializing.
InvalidDocumentKey(Bson)A key could not be serialized to a BSON string.
A general error that occurred during serialization. See: https://docs.rs/serde/1.0.110/serde/ser/trait.Error.html#tymethod.custom
This variant is marked as non-exhaustive
Show fields
Fields of SerializationError
message: StringA message describing the error.
UnsupportedUnsignedInteger(u64)Returned when serialization of an unsigned integer was attempted. BSON only supports 32-bit and 64-bit signed integers.
To serialize unsigned integers to BSON, use an appropriate helper from
crate::serde_helpers or enable the “u2i” feature flag.
Trait Implementations
replaced by Error::source, which can support downcasting
The lower-level source of this error, if any. Read more
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Errorimpl !UnwindSafe for ErrorBlanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V