Struct safe_transmute::error::GuardError [−][src]
A slice boundary guard error, usually created by a
Guard
.
Examples
assert_eq!( SingleManyGuard::check::<u16>(&[0x00]), Err(GuardError { required: 16 / 8, actual: 1, reason: ErrorReason::NotEnoughBytes, }) );
Fields
required: usize
The required amount of bytes for transmutation.
actual: usize
The actual amount of bytes.
reason: ErrorReason
Why this required
/actual
/T
combo is an error.
Trait Implementations
impl Clone for GuardError
[src][+]
impl Copy for GuardError
[src]
impl Debug for GuardError
[src][+]
impl Display for GuardError
[src][+]
impl Eq for GuardError
[src]
impl Error for GuardError
[src][+]
impl<'a, S, T> From<GuardError> for Error<'a, S, T>
[src][+]
impl Hash for GuardError
[src][+]
impl PartialEq<GuardError> for GuardError
[src][+]
impl StructuralEq for GuardError
[src]
impl StructuralPartialEq for GuardError
[src]
Auto Trait Implementations
impl RefUnwindSafe for GuardError
impl Send for GuardError
impl Sync for GuardError
impl Unpin for GuardError
impl UnwindSafe for GuardError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src][+]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,