pub trait Memmem<'i, 'b, 'r, I: Input, const N: usize> {
// Required method
fn find_label(
&mut self,
first_block: Option<I::Block<'i, N>>,
start_idx: usize,
label: &StringPattern,
) -> Result<Option<(usize, I::Block<'i, N>)>, InputError>;
}
Expand description
Classifier that can quickly find a member name in a byte stream.
Required Methods§
Sourcefn find_label(
&mut self,
first_block: Option<I::Block<'i, N>>,
start_idx: usize,
label: &StringPattern,
) -> Result<Option<(usize, I::Block<'i, N>)>, InputError>
fn find_label( &mut self, first_block: Option<I::Block<'i, N>>, start_idx: usize, label: &StringPattern, ) -> Result<Option<(usize, I::Block<'i, N>)>, InputError>
Find a member key identified by a given StringPattern
.
first_block
– optional first block to search; if not provided, the search will start at the next block returned by the underlyingInput
iterator.start_idx
– index of the start of search, either falling insidefirst_block
, or at the start of the next block.
§Errors
Errors when reading the underlying Input
are propagated.