devela::_dep::rkyv::bytecheck

Trait CheckBytes

pub unsafe trait CheckBytes<C>
where C: Fallible + ?Sized,
{ // Required method unsafe fn check_bytes( value: *const Self, context: &mut C, ) -> Result<(), <C as Fallible>::Error> ; }
Available on crate feature dep_rkyv only.
Expand description

A type that can check whether a pointer points to a valid value.

CheckBytes can be derived with CheckBytes or implemented manually for custom behavior.

§Safety

check_bytes must only return Ok if value points to a valid instance of Self. Because value must always be properly aligned for Self and point to enough bytes to represent the type, this implies that value may be dereferenced safely.

§Example

use core::{error::Error, fmt};

use bytecheck::CheckBytes;
use rancor::{fail, Fallible, Source};

#[repr(C, align(4))]
pub struct NonMaxU32(u32);

unsafe impl<C: Fallible + ?Sized> CheckBytes<C> for NonMaxU32
where
    C::Error: Source,
{
    unsafe fn check_bytes(
        value: *const Self,
        context: &mut C,
    ) -> Result<(), C::Error> {
        #[derive(Debug)]
        struct NonMaxCheckError;

        impl fmt::Display for NonMaxCheckError {
            fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
                write!(f, "non-max u32 was set to u32::MAX")
            }
        }

        impl Error for NonMaxCheckError {}

        let value = unsafe { value.read() };
        if value.0 == u32::MAX {
            fail!(NonMaxCheckError);
        }

        Ok(())
    }
}

See Verify for an example which uses less unsafe.

Required Methods§

unsafe fn check_bytes( value: *const Self, context: &mut C, ) -> Result<(), <C as Fallible>::Error>

Checks whether the given pointer points to a valid value within the given context.

§Safety

The passed pointer must be aligned and point to enough initialized bytes to represent the type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<C> CheckBytes<C> for bool
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

unsafe fn check_bytes( value: *const bool, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for char
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

unsafe fn check_bytes( ptr: *const char, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for f32
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const f32, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for f64
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const f64, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for i8
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const i8, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for i16
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const i16, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for i32
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const i32, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for i64
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const i64, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for i128
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const i128, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for str
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

unsafe fn check_bytes( value: *const str, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for u8
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const u8, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for u16
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const u16, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for u32
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const u32, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for u64
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const u64, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for u128
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const u128, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<C> CheckBytes<C> for ()
where C: Fallible + ?Sized,

§

unsafe fn check_bytes( _: *const (), _: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<T0, C> CheckBytes<C> for (T0,)
where T0: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

unsafe fn check_bytes( value: *const (T0,), context: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<T0, T1, C> CheckBytes<C> for (T0, T1)
where T0: CheckBytes<C>, T1: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

unsafe fn check_bytes( value: *const (T0, T1), context: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<T0, T1, T2, C> CheckBytes<C> for (T0, T1, T2)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

unsafe fn check_bytes( value: *const (T0, T1, T2), context: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<T0, T1, T2, T3, C> CheckBytes<C> for (T0, T1, T2, T3)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

unsafe fn check_bytes( value: *const (T0, T1, T2, T3), context: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<T0, T1, T2, T3, T4, C> CheckBytes<C> for (T0, T1, T2, T3, T4)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

unsafe fn check_bytes( value: *const (T0, T1, T2, T3, T4), context: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<T0, T1, T2, T3, T4, T5, C> CheckBytes<C> for (T0, T1, T2, T3, T4, T5)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, T5: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

unsafe fn check_bytes( value: *const (T0, T1, T2, T3, T4, T5), context: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<T0, T1, T2, T3, T4, T5, T6, C> CheckBytes<C> for (T0, T1, T2, T3, T4, T5, T6)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, T5: CheckBytes<C>, T6: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, C> CheckBytes<C> for (T0, T1, T2, T3, T4, T5, T6, T7)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, T5: CheckBytes<C>, T6: CheckBytes<C>, T7: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, C> CheckBytes<C> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, T5: CheckBytes<C>, T6: CheckBytes<C>, T7: CheckBytes<C>, T8: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, C> CheckBytes<C> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, T5: CheckBytes<C>, T6: CheckBytes<C>, T7: CheckBytes<C>, T8: CheckBytes<C>, T9: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, C> CheckBytes<C> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, T5: CheckBytes<C>, T6: CheckBytes<C>, T7: CheckBytes<C>, T8: CheckBytes<C>, T9: CheckBytes<C>, T10: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, C> CheckBytes<C> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, T5: CheckBytes<C>, T6: CheckBytes<C>, T7: CheckBytes<C>, T8: CheckBytes<C>, T9: CheckBytes<C>, T10: CheckBytes<C>, T11: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, C> CheckBytes<C> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
where T0: CheckBytes<C>, T1: CheckBytes<C>, T2: CheckBytes<C>, T3: CheckBytes<C>, T4: CheckBytes<C>, T5: CheckBytes<C>, T6: CheckBytes<C>, T7: CheckBytes<C>, T8: CheckBytes<C>, T9: CheckBytes<C>, T10: CheckBytes<C>, T11: CheckBytes<C>, T12: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T, C> CheckBytes<C> for [T]
where T: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

unsafe fn check_bytes( value: *const [T], context: &mut C, ) -> Result<(), <C as Fallible>::Error>

§

impl<T, const N: usize, C> CheckBytes<C> for [T; N]
where T: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

unsafe fn check_bytes( value: *const [T; N], context: &mut C, ) -> Result<(), <C as Fallible>::Error>

Implementors§

§

impl<C> CheckBytes<C> for AtomicBool
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for AtomicI8
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicI16
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicI32
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicI64
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU8
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU16
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU32
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU64
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for NonZero<i8>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<i16>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<i32>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<i64>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<i128>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<u8>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<u16>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<u32>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<u64>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for NonZero<u128>
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for PhantomPinned
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for RangeFull
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for CStr
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<C> CheckBytes<C> for AtomicI16_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicI16_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicI32_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicI32_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicI64_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicI64_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU16_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU16_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU32_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU32_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU64_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for AtomicU64_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for NonZeroI16_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i16>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI16_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i16>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI32_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i32>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI32_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i32>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI64_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i64>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI64_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i64>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI128_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i128>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI128_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i128>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU16_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u16>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU16_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u16>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU32_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u32>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU32_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u32>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU64_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u64>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU64_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u64>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU128_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u128>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU128_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u128>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for char_be
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, char: CheckBytes<C>,

§

impl<C> CheckBytes<C> for char_le
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, char: CheckBytes<C>,

§

impl<C> CheckBytes<C> for f32_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for f32_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for f64_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for f64_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i16_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i16_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i32_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i32_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i64_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i64_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i128_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i128_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u16_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u16_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u32_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u32_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u64_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u64_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u128_be
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u128_le
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for NonZeroI16_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i16>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI16_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i16>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI32_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i32>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI32_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i32>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI64_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i64>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI64_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i64>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI128_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i128>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroI128_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<i128>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU16_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u16>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU16_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u16>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU32_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u32>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU32_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u32>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU64_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u64>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU64_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u64>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU128_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u128>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for NonZeroU128_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, NonZero<u128>: CheckBytes<C>,

§

impl<C> CheckBytes<C> for char_ube
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, char: CheckBytes<C>,

§

impl<C> CheckBytes<C> for char_ule
where C: Fallible + ?Sized, <C as Fallible>::Error: Trace, char: CheckBytes<C>,

§

impl<C> CheckBytes<C> for f32_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for f32_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for f64_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for f64_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i16_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i16_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i32_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i32_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i64_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i64_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i128_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for i128_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u16_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u16_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u32_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u32_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u64_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u64_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u128_ube
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for u128_ule
where C: Fallible + ?Sized,

§

impl<C> CheckBytes<C> for ArchivedStringRepr
where C: Fallible + ?Sized, <C as Fallible>::Error: Source,

§

impl<K, H, __C> CheckBytes<__C> for ArchivedHashSet<K, H>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedHashMap<K, (), H>: CheckBytes<__C>,

§

impl<K, H, __C> CheckBytes<__C> for ArchivedIndexSet<K, H>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedIndexMap<K, (), H>: CheckBytes<__C>,

§

impl<K, V, H, __C> CheckBytes<__C> for ArchivedHashMap<K, V, H>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedHashTable<Entry<K, V>>: CheckBytes<__C>, PhantomData<H>: CheckBytes<__C>,

§

impl<K, V, H, __C> CheckBytes<__C> for ArchivedIndexMap<K, V, H>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedIndexMap<K, V, H>: Verify<__C>, ArchivedHashTable<u32_le>: CheckBytes<__C>, RelPtr<Entry<K, V>, i32_le>: CheckBytes<__C>, PhantomData<H>: CheckBytes<__C>,

§

impl<K, V, __C> CheckBytes<__C> for Entry<K, V>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, K: CheckBytes<__C>, V: CheckBytes<__C>,

§

impl<K, V, const E: usize, __C> CheckBytes<__C> for ArchivedBTreeMap<K, V, E>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedBTreeMap<K, V, E>: Verify<__C>, RelPtr<Node<K, V, E>, i32_le>: CheckBytes<__C>, u32_le: CheckBytes<__C>, PhantomData<(K, V)>: CheckBytes<__C>,

§

impl<K, const E: usize, __C> CheckBytes<__C> for ArchivedBTreeSet<K, E>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedBTreeMap<K, (), E>: CheckBytes<__C>,

§

impl<O, __C> CheckBytes<__C> for RawRelPtr<O>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, O: CheckBytes<__C>, PhantomPinned: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, __C> CheckBytes<__C> for ArchivedTuple13<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>, T5: CheckBytes<__C>, T6: CheckBytes<__C>, T7: CheckBytes<__C>, T8: CheckBytes<__C>, T9: CheckBytes<__C>, T10: CheckBytes<__C>, T11: CheckBytes<__C>, T12: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, __C> CheckBytes<__C> for ArchivedTuple12<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>, T5: CheckBytes<__C>, T6: CheckBytes<__C>, T7: CheckBytes<__C>, T8: CheckBytes<__C>, T9: CheckBytes<__C>, T10: CheckBytes<__C>, T11: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, __C> CheckBytes<__C> for ArchivedTuple11<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>, T5: CheckBytes<__C>, T6: CheckBytes<__C>, T7: CheckBytes<__C>, T8: CheckBytes<__C>, T9: CheckBytes<__C>, T10: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, __C> CheckBytes<__C> for ArchivedTuple10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>, T5: CheckBytes<__C>, T6: CheckBytes<__C>, T7: CheckBytes<__C>, T8: CheckBytes<__C>, T9: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, __C> CheckBytes<__C> for ArchivedTuple9<T0, T1, T2, T3, T4, T5, T6, T7, T8>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>, T5: CheckBytes<__C>, T6: CheckBytes<__C>, T7: CheckBytes<__C>, T8: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, __C> CheckBytes<__C> for ArchivedTuple8<T0, T1, T2, T3, T4, T5, T6, T7>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>, T5: CheckBytes<__C>, T6: CheckBytes<__C>, T7: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, T5, T6, __C> CheckBytes<__C> for ArchivedTuple7<T0, T1, T2, T3, T4, T5, T6>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>, T5: CheckBytes<__C>, T6: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, T5, __C> CheckBytes<__C> for ArchivedTuple6<T0, T1, T2, T3, T4, T5>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>, T5: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, T4, __C> CheckBytes<__C> for ArchivedTuple5<T0, T1, T2, T3, T4>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>, T4: CheckBytes<__C>,

§

impl<T0, T1, T2, T3, __C> CheckBytes<__C> for ArchivedTuple4<T0, T1, T2, T3>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>, T3: CheckBytes<__C>,

§

impl<T0, T1, T2, __C> CheckBytes<__C> for ArchivedTuple3<T0, T1, T2>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>, T2: CheckBytes<__C>,

§

impl<T0, T1, __C> CheckBytes<__C> for ArchivedTuple2<T0, T1>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>, T1: CheckBytes<__C>,

§

impl<T0, __C> CheckBytes<__C> for ArchivedTuple1<T0>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T0: CheckBytes<__C>,

§

impl<T, C> CheckBytes<C> for Cell<T>
where T: CheckBytes<C> + ?Sized, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T, C> CheckBytes<C> for ManuallyDrop<T>
where T: CheckBytes<C> + ?Sized, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T, C> CheckBytes<C> for PhantomData<T>
where C: Fallible + ?Sized, T: ?Sized,

§

impl<T, C> CheckBytes<C> for Range<T>
where T: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T, C> CheckBytes<C> for RangeFrom<T>
where T: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T, C> CheckBytes<C> for RangeTo<T>
where T: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T, C> CheckBytes<C> for RangeToInclusive<T>
where T: CheckBytes<C>, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T, C> CheckBytes<C> for UnsafeCell<T>
where T: CheckBytes<C> + ?Sized, C: Fallible + ?Sized, <C as Fallible>::Error: Trace,

§

impl<T, E, __C> CheckBytes<__C> for ArchivedResult<T, E>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Source, T: CheckBytes<__C>, E: CheckBytes<__C>,

§

impl<T, F, __C> CheckBytes<__C> for ArchivedRc<T, F>
where T: ArchivePointee + ?Sized, __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedRc<T, F>: Verify<__C>, RelPtr<T, i32_le>: CheckBytes<__C>, PhantomData<F>: CheckBytes<__C>,

§

impl<T, F, __C> CheckBytes<__C> for ArchivedRcWeak<T, F>
where T: ArchivePointee + ?Sized, __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedRcWeak<T, F>: Verify<__C>, RelPtr<T, i32_le>: CheckBytes<__C>, PhantomData<F>: CheckBytes<__C>,

§

impl<T, N, C> CheckBytes<C> for NichedOption<T, N>
where T: CheckBytes<C>, N: Niching<T> + ?Sized, C: Fallible + ?Sized,

§

impl<T, O, __C> CheckBytes<__C> for RelPtr<T, O>

§

impl<T, __C> CheckBytes<__C> for ArchivedBound<T>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Source, T: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedOption<T>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Source, T: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedBox<T>
where T: ArchivePointee + ?Sized, __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedBox<T>: Verify<__C>, RelPtr<T, i32_le>: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedHashTable<T>

§

impl<T, __C> CheckBytes<__C> for ArchivedOptionBox<T>
where T: ArchivePointee + ?Sized, __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, Repr<T>: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedRange<T>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedRangeFrom<T>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedRangeInclusive<T>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedRangeTo<T>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedRangeToInclusive<T>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, T: CheckBytes<__C>,

§

impl<T, __C> CheckBytes<__C> for ArchivedVec<T>
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedVec<T>: Verify<__C>, RelPtr<T, i32_le>: CheckBytes<__C>, u32_le: CheckBytes<__C>,

Source§

impl<T, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedBareBox<T>
where T: Archive, <__C as Fallible>::Error: Trace, <T as Archive>::Archived: CheckBytes<__C>,

Source§

impl<T, const C: usize, const R: usize, const CR: usize, const RMAJ: bool, S: Storage, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedArray2d<T, C, R, CR, RMAJ, S>
where Array<T, CR, S>: Archive, <__C as Fallible>::Error: Trace, <Array<T, CR, S> as Archive>::Archived: CheckBytes<__C>,

Source§

impl<T, const CAP: usize, IDX, S: Storage, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedDestaque<T, CAP, IDX, S>
where Array<T, CAP, S>: Archive, IDX: Archive, <__C as Fallible>::Error: Trace, <Array<T, CAP, S> as Archive>::Archived: CheckBytes<__C>, <IDX as Archive>::Archived: CheckBytes<__C>,

Source§

impl<T, const CAP: usize, IDX, S: Storage, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedStack<T, CAP, IDX, S>
where Array<T, CAP, S>: Archive, IDX: Archive, <__C as Fallible>::Error: Trace, <Array<T, CAP, S> as Archive>::Archived: CheckBytes<__C>, <IDX as Archive>::Archived: CheckBytes<__C>,

Source§

impl<T, const CAP: usize, S: Storage, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedArray<T, CAP, S>

§

impl<__C> CheckBytes<__C> for ArchivedIpAddr

§

impl<__C> CheckBytes<__C> for ArchivedSocketAddr

§

impl<__C> CheckBytes<__C> for ArchivedCString
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedCString: Verify<__C>, RelPtr<CStr, i32_le>: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedIpv4Addr
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, [u8; 4]: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedIpv6Addr
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, [u8; 16]: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedSocketAddrV4
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedIpv4Addr: CheckBytes<__C>, u16_le: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedSocketAddrV6

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroI8
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <i8 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroI16
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <i16 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroI32
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <i32 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroI64
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <i64 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroI128
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <i128 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroU8
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <u8 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroU16
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <u16 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroU32
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <u32 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroU64
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <u64 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedOptionNonZeroU128
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, <u128 as Archive>::Archived: CheckBytes<__C>,

§

impl<__C> CheckBytes<__C> for ArchivedRangeFull
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace,

§

impl<__C> CheckBytes<__C> for ArchivedString

§

impl<__C> CheckBytes<__C> for ArchivedDuration
where __C: Fallible + ?Sized, <__C as Fallible>::Error: Trace, ArchivedDuration: Verify<__C>, u64_le: CheckBytes<__C>, u32_le: CheckBytes<__C>,

Source§

impl<__C: Fallible + ?Sized> CheckBytes<__C> for ArchivedBoxed
where <__C as Fallible>::Error: Trace,

Available on crate feature alloc only.