pub enum RawError {
UnexpectedType,
MalformedValue(String),
Utf8EncodingError(Vec<u8>),
}Expand description
Error to indicate that either a value was empty or it contained an unexpected type, for use with the direct getters.
Variants§
UnexpectedType
Found a Bson value with the specified key, but not with the expected type
MalformedValue(String)
The found value was not well-formed
Utf8EncodingError(Vec<u8>)
Found a value where a utf-8 string was expected, but it was not valid utf-8. The error value contains the malformed data as a string.
Trait Implementations§
Source§impl Error for RawError
impl Error for RawError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<'a> From<RawError> for ValueAccessError
impl<'a> From<RawError> for ValueAccessError
Source§fn from(src: RawError) -> ValueAccessError
fn from(src: RawError) -> ValueAccessError
Converts to this type from the input type.
Source§impl<'a> From<ValueAccessError> for RawError
impl<'a> From<ValueAccessError> for RawError
Source§fn from(src: ValueAccessError) -> RawError
fn from(src: ValueAccessError) -> RawError
Converts to this type from the input type.
impl StructuralPartialEq for RawError
Auto Trait Implementations§
impl Freeze for RawError
impl RefUnwindSafe for RawError
impl Send for RawError
impl Sync for RawError
impl Unpin for RawError
impl UnwindSafe for RawError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more