pub struct BinaryMatcher<'a> { /* private fields */ }Expand description
The BinaryMatcher is responsible for searching a BinaryPattern within a MatchTarget.
Use BinaryMatcher::next_match to iterate through matches of the specified pattern.
Implementations§
Source§impl<'a> BinaryMatcher<'a>
impl<'a> BinaryMatcher<'a>
pub fn new(pattern: &'a dyn BinaryPattern, target: &'a dyn MatchTarget) -> Self
Sourcepub fn next_match(&mut self) -> Option<&[u32]>
pub fn next_match(&mut self) -> Option<&[u32]>
Finds the next match for the associated BinaryPattern within the MatchTarget.
§Returns
Some(&[u32])containing the saved stack. The first element of the saved stack represents the start of the matched location.
Subsequent elements can be pushed using theAtom::SaveCursoratom or the'command within the binary pattern.Noneif no further matches are available.
Auto Trait Implementations§
impl<'a> Freeze for BinaryMatcher<'a>
impl<'a> !RefUnwindSafe for BinaryMatcher<'a>
impl<'a> !Send for BinaryMatcher<'a>
impl<'a> !Sync for BinaryMatcher<'a>
impl<'a> Unpin for BinaryMatcher<'a>
impl<'a> !UnwindSafe for BinaryMatcher<'a>
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