Expand description
If you’re looking to construct a pattern:
- See
aob!to construct a pattern at compile-time. - See
DynamicNeedleto construct a pattern at run-time.
You’ll need to use Needle before you can do anything with a pattern:
use aob::Needle as _;
aob::aob! { const NEEDLE = ida("67 ? AB"); }
let haystack = [0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF];
let found = NEEDLE.find(&haystack).unwrap();
assert_eq!(found.range(), 3..6);Macros§
Structs§
- Dynamic
Needle - The run-time variant of a
Needle. - Error
- Describes errors encountered when parsing custom pattern syntax.
- Find
- An
Iteratorfor finding subsequent matches of aNeedlein a haystack. - Match
- Represents a matching
Needlefound in the haystack. - Static
Needle - The compile-time variant of a
Needle.
Enums§
- Method
- The method chosen to quickly compare strings for equality, in lieu of
strcmp, since we need to account for wildcards. - Reason
- A
Reasongives more context about why parsing failed.
Traits§
- Needle
- The common interface for searching haystacks with needles.