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 ocurred 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: String
A 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
impl Error for Error
[src]
impl Error for Error
[src]fn cause(&self) -> Option<&dyn Error>
[src]
fn cause(&self) -> Option<&dyn Error>
[src]replaced by Error::source, which can support downcasting
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,