Trait bytecheck::CheckBytes[][src]

pub trait CheckBytes<C: ?Sized> {
    type Error: Error + 'static;
    unsafe fn check_bytes<'a>(
        value: *const Self,
        context: &mut C
    ) -> Result<&'a Self, Self::Error>; }
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.

Associated Types

The error that may result from checking the type.

Required methods

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 bytes to represent the type.

Implementations on Foreign Types

Implementors