Enum safe_transmute::error::ErrorReason
source · pub enum ErrorReason {
NotEnoughBytes,
TooManyBytes,
InexactByteCount,
}
Expand description
How the type’s size compares to the received byte count and the transmutation function’s characteristic.
Variants§
NotEnoughBytes
Too few bytes to fill even one instance of a type.
TooManyBytes
Too many bytes to fill a type.
Currently unused.
InexactByteCount
The byte amount received is not the same as the type’s size.
Implementations§
source§impl ErrorReason
impl ErrorReason
sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
Retrieve a human readable description of the reason.
Trait Implementations§
source§impl Clone for ErrorReason
impl Clone for ErrorReason
source§fn clone(&self) -> ErrorReason
fn clone(&self) -> ErrorReason
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ErrorReason
impl Debug for ErrorReason
source§impl Hash for ErrorReason
impl Hash for ErrorReason
source§impl PartialEq for ErrorReason
impl PartialEq for ErrorReason
source§fn eq(&self, other: &ErrorReason) -> bool
fn eq(&self, other: &ErrorReason) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ErrorReason
impl Eq for ErrorReason
impl StructuralPartialEq for ErrorReason
Auto Trait Implementations§
impl Freeze for ErrorReason
impl RefUnwindSafe for ErrorReason
impl Send for ErrorReason
impl Sync for ErrorReason
impl Unpin for ErrorReason
impl UnwindSafe for ErrorReason
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