Struct aho_corasick::util::prefilter::RareByteOffsets
source · struct RareByteOffsets {
set: [RareByteOffset; 256],
}
Expand description
A set of byte offsets, keyed by byte.
Fields§
§set: [RareByteOffset; 256]
Each entry corresponds to the maximum offset of the corresponding byte across all patterns seen.
Implementations§
source§impl RareByteOffsets
impl RareByteOffsets
sourcepub(crate) fn empty() -> RareByteOffsets
pub(crate) fn empty() -> RareByteOffsets
Create a new empty set of rare byte offsets.
sourcepub(crate) fn set(&mut self, byte: u8, off: RareByteOffset)
pub(crate) fn set(&mut self, byte: u8, off: RareByteOffset)
Add the given offset for the given byte to this set. If the offset is greater than the existing offset, then it overwrites the previous value and returns false. If there is no previous value set, then this sets it and returns true.
Trait Implementations§
source§impl Clone for RareByteOffsets
impl Clone for RareByteOffsets
source§fn clone(&self) -> RareByteOffsets
fn clone(&self) -> RareByteOffsets
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RareByteOffsets
impl Debug for RareByteOffsets
impl Copy for RareByteOffsets
Auto Trait Implementations§
impl Freeze for RareByteOffsets
impl RefUnwindSafe for RareByteOffsets
impl Send for RareByteOffsets
impl Sync for RareByteOffsets
impl Unpin for RareByteOffsets
impl UnwindSafe for RareByteOffsets
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