pub struct Searcher<P: Pattern> { /* private fields */ }Expand description
A Generic searcher for any type that implements the Pattern trait
Implementations§
Source§impl<P: Pattern> Searcher<P>
impl<P: Pattern> Searcher<P>
Sourcepub fn new(pattern: P) -> AzUtilResult<Self>
pub fn new(pattern: P) -> AzUtilResult<Self>
Creates a new pattern searcher object
Sourcepub fn search(&mut self, region: &[u8]) -> Option<usize>
pub fn search(&mut self, region: &[u8]) -> Option<usize>
Searches a given memory region for the first occurance of the pattern
Sourcepub fn search_all<'searcher, 'region>(
&'searcher mut self,
region: &'region [u8],
) -> SearchAll<'searcher, 'region, P> ⓘ
pub fn search_all<'searcher, 'region>( &'searcher mut self, region: &'region [u8], ) -> SearchAll<'searcher, 'region, P> ⓘ
Returns an iterator over all non-overlapping matches of the pattern in the region.
Sourcepub fn set_pattern(&mut self, pattern: P)
pub fn set_pattern(&mut self, pattern: P)
Resets the searcher and sets a new pattern
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for Searcher<P>where
P: Freeze,
impl<P> RefUnwindSafe for Searcher<P>where
P: RefUnwindSafe,
impl<P> Send for Searcher<P>where
P: Send,
impl<P> Sync for Searcher<P>where
P: Sync,
impl<P> Unpin for Searcher<P>where
P: Unpin,
impl<P> UnsafeUnpin for Searcher<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Searcher<P>where
P: UnwindSafe,
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