struct Hash(u32);
Expand description
A Rabin-Karp hash. This might represent the hash of a needle, or the hash of a rolling window in the haystack.
Tuple Fields§
§0: u32
Implementations§
source§impl Hash
impl Hash
sourceunsafe fn forward(start: *const u8, end: *const u8) -> Hash
unsafe fn forward(start: *const u8, end: *const u8) -> Hash
Create a new hash from the bytes given for use in forward searches.
§Safety
The given pointers must be valid to read from within their range.
sourceunsafe fn reverse(start: *const u8, end: *const u8) -> Hash
unsafe fn reverse(start: *const u8, end: *const u8) -> Hash
Create a new hash from the bytes given for use in reverse searches.
§Safety
The given pointers must be valid to read from within their range.
Trait Implementations§
impl Copy for Hash
impl Eq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)