Struct flatbuffers::Verifier
source · 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.