Enum dusk_bytes::Error
source · [−]pub enum Error {
InvalidData,
BadLength {
found: usize,
expected: usize,
},
InvalidChar {
ch: char,
index: usize,
},
}Expand description
Dusk Bytes operation error variants
Variants
InvalidData
Generic error that can be returned in a [Deserializable::from_bytes]
implementation
BadLength
Automatically returned from the default implementation of
[DeserializableSlice::from_slice] if the slice given is smaller than
the mandatory size for the struct.
InvalidChar
Automatically returned from the default implementation of
[ParseHexStr::from_hex_str] if an invalid character is found in the
string slice.
Trait Implementations
sourceimpl BadLength for Error
impl BadLength for Error
sourcefn bad_length(found: usize, expected: usize) -> Self
fn bad_length(found: usize, expected: usize) -> Self
Invoked when a buffer of bad length is given to [from_slice]
sourceimpl InvalidChar for Error
impl InvalidChar for Error
sourcefn invalid_char(ch: char, index: usize) -> Self
fn invalid_char(ch: char, index: usize) -> Self
Invoked when a string slice with a non hex character is is give to
[ParseHexStr::from_hex_str] Read more
sourceimpl Ord for Error
impl Ord for Error
sourceimpl PartialOrd<Error> for Error
impl PartialOrd<Error> for Error
sourcefn partial_cmp(&self, other: &Error) -> Option<Ordering>
fn partial_cmp(&self, other: &Error) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more