Trait bytecheck::Verify

source ·
pub unsafe trait Verify<C: Fallible + ?Sized> {
    // Required method
    fn verify(&self, context: &mut C) -> Result<(), C::Error>;
}
Expand description

A type that can check whether its invariants are upheld.

§Safety

  • verify must only return Ok if all of the invariants of this type are upheld by self.
  • verify may not assume that its type invariants are upheld by the given self.

Required Methods§

source

fn verify(&self, context: &mut C) -> Result<(), C::Error>

Checks whether the invariants of this type are upheld by self.

Implementors§