pub enum BindError {
BufferUnderflow {
needed: usize,
available: usize,
},
InvalidData(String),
StringEncoding(String),
UnsupportedType(String),
VersionMismatch {
expected_magic: u8,
expected_version: u8,
found_magic: u8,
found_version: u8,
},
}Expand description
Errors that can occur during binding operations.
Variants§
BufferUnderflow
Buffer underflow: attempted to read more bytes than available.
InvalidData(String)
Invalid data encountered during deserialization.
StringEncoding(String)
String encoding/decoding error.
UnsupportedType(String)
Unsupported type encountered.
VersionMismatch
The on-disk payload was written by an older or newer version of the binding’s wire format than this build understands.
Returned by SerdeBinding::entry_to_object when the 2-byte
header ([magic, version]) does not match this build’s
expectation. See docs/src/getting-started/bindings.md for
the format description and migration guidance.
Trait Implementations§
Source§impl Error for BindError
impl Error for BindError
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()
Auto Trait Implementations§
impl Freeze for BindError
impl RefUnwindSafe for BindError
impl Send for BindError
impl Sync for BindError
impl Unpin for BindError
impl UnsafeUnpin for BindError
impl UnwindSafe for BindError
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