Trait safe_transmute::guard::Guard

source ·
pub trait Guard {
    // Required method
    fn check<T>(v: &[u8]) -> Result<(), GuardError>;
}
Expand description

The trait describes types which define boundary checking strategies. See the module-level documentation for more details.

Required Methods§

source

fn check<T>(v: &[u8]) -> Result<(), GuardError>

Check the size of the given byte slice against a particular type.

§Errors

If the slice’s size does not comply with this guard, an error which specifies the incompatibility is returned.

Object Safety§

This trait is not object safe.

Implementors§