pub struct Verifier<'opts, 'buf> { /* private fields */ }
Expand description
Carries the verification state. Should not be reused between tables.
Implementations§
Source§impl<'opts, 'buf> Verifier<'opts, 'buf>
impl<'opts, 'buf> Verifier<'opts, 'buf>
pub fn new(opts: &'opts VerifierOptions, buffer: &'buf [u8]) -> Self
Sourcepub fn in_buffer<T>(&mut self, pos: usize) -> Result<(), InvalidFlatbuffer>
pub fn in_buffer<T>(&mut self, pos: usize) -> Result<(), InvalidFlatbuffer>
Check that there really is a T in there.
pub fn visit_table<'ver>( &'ver mut self, table_pos: usize, ) -> Result<TableVerifier<'ver, 'opts, 'buf>, InvalidFlatbuffer>
Sourcepub fn verify_union_variant<T: Verifiable>(
&mut self,
variant: &'static str,
position: usize,
) -> Result<(), InvalidFlatbuffer>
pub fn verify_union_variant<T: Verifiable>( &mut self, variant: &'static str, position: usize, ) -> Result<(), InvalidFlatbuffer>
Runs the union variant’s type’s verifier assuming the variant is at the given position, tracing the error.
Trait Implementations§
Auto Trait Implementations§
impl<'opts, 'buf> Freeze for Verifier<'opts, 'buf>
impl<'opts, 'buf> RefUnwindSafe for Verifier<'opts, 'buf>
impl<'opts, 'buf> Send for Verifier<'opts, 'buf>
impl<'opts, 'buf> Sync for Verifier<'opts, 'buf>
impl<'opts, 'buf> Unpin for Verifier<'opts, 'buf>
impl<'opts, 'buf> UnwindSafe for Verifier<'opts, 'buf>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more