Enum binary_util::error::BinaryError
source · pub enum BinaryError {
OutOfBounds(usize, usize, &'static str),
EOF(usize),
RecoverableKnown(String),
RecoverableUnknown,
}
Expand description
An enum consisting of a Binary Error (recoverable)
Variants§
OutOfBounds(usize, usize, &'static str)
Offset is out of bounds
Tuple Values:
usize
= Given Offset.usize
= Stream length.&'static str
= Message to add on to the error.
EOF(usize)
Similar to OutOfBounds
except it means;
the stream tried to read more than possible.
Tuple Values:
usize
= Stream length.
RecoverableKnown(String)
A known error that was recoverable to safely proceed the stack.
RecoverableUnknown
An unknown error occurred, but it wasn’t critical, we can safely proceed on the stack.
Implementations§
source§impl BinaryError
impl BinaryError
pub fn get_message(&self) -> String
Trait Implementations§
source§impl Debug for BinaryError
impl Debug for BinaryError
source§impl Display for BinaryError
impl Display for BinaryError
source§impl From<Error> for BinaryError
impl From<Error> for BinaryError
source§impl PartialEq<BinaryError> for BinaryError
impl PartialEq<BinaryError> for BinaryError
source§fn eq(&self, other: &BinaryError) -> bool
fn eq(&self, other: &BinaryError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BinaryError
Auto Trait Implementations§
impl RefUnwindSafe for BinaryError
impl Send for BinaryError
impl Sync for BinaryError
impl Unpin for BinaryError
impl UnwindSafe for BinaryError
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