Expand description
If you’re looking to construct a pattern:
- See
aob!
to construct a pattern at compile-time. - See
DynamicNeedle
to 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§
- Parses, validates, and constructs a
Needle
at compile-time.
Structs§
- The run-time variant of a
Needle
. - Describes errors encountered when parsing custom pattern syntax.
- Represents a matching
Needle
found in the haystack. - The compile-time variant of a
Needle
.
Enums§
- The method chosen to quickly compare strings for equality, in lieu of
strcmp
, since we need to account for wildcards. - A
Reason
gives more context about why parsing failed.
Traits§
- The common interface for searching haystacks with needles.