Trait safe_transmute::guard::Guard[][src]

pub trait Guard {
    fn check<T>(v: &[u8]) -> Result<(), GuardError>;
}

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

Required methods

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

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.

Loading content...

Implementors

impl Guard for AllOrNothingGuard[src]

impl Guard for PedanticGuard[src]

impl Guard for PermissiveGuard[src]

impl Guard for SingleManyGuard[src]

impl Guard for SingleValueGuard[src]

Loading content...