pub trait CheckBytes<C: ?Sized> {
type Error: Error + 'static;
// Required method
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.
Required Associated Types§
Required Methods§
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.