pub struct Config {
pub min_length: u8,
pub min_length_nul: u8,
pub strict_nul: bool,
pub heuristic: Heuristic,
}
Expand description
Configure the string finding heuristics.
Fields
min_length: u8
Minimum string length to accept as a valid string.
min_length_nul: u8
Minimum string length when there is a nul terminator. Can have a lower threshold as having a nul terminator increases confidence that this is a c string literal.
strict_nul: bool
When true, requires any found string to be terminated by a nul terminator. A nul terminator increases confidence that this is indeed a c string literal.
heuristic: Heuristic
Heuristic to use to validate sequences.
Implementations
sourceimpl Config
impl Config
sourcepub fn enumerate(self, base: u32, bytes: &[u8]) -> Enumerator<'_>ⓘNotable traits for Enumerator<'a>impl<'a> Iterator for Enumerator<'a> type Item = Found<'a>;
pub fn enumerate(self, base: u32, bytes: &[u8]) -> Enumerator<'_>ⓘNotable traits for Enumerator<'a>impl<'a> Iterator for Enumerator<'a> type Item = Found<'a>;
Constructs the enumerator with this configuration.
Given the base
argument the relative virtual address of the bytes
slice.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more