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§
source§impl BadLength for Error
impl BadLength for Error
source§fn 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
]source§impl InvalidChar for Error
impl InvalidChar for Error
source§fn 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
]source§impl Ord for Error
impl Ord for Error
source§impl PartialEq for Error
impl PartialEq for Error
source§impl PartialOrd for Error
impl PartialOrd for Error
1.0.0 · source§fn 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 moreimpl 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§
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