Struct crc32fast::Hasher

source ·
pub struct Hasher { /* private fields */ }
Expand description

Represents an in-progress CRC32 computation.

Implementations§

Create a new Hasher.

This will perform a CPU feature detection at runtime to select the most optimal implementation for the current processor architecture.

Create a new Hasher with an initial CRC32 state.

This works just like Hasher::new, except that it allows for an initial CRC32 state to be passed in.

Create a new Hasher with an initial CRC32 state.

As new_with_initial, but also accepts a length (in bytes). The resulting object can then be used with combine to compute crc(a || b) from crc(a), crc(b), and len(b).

Process the given byte slice and update the hash state.

Finalize the hash state and return the computed CRC32 value.

Reset the hash state.

Combine the hash state with the hash state for the subsequent block of bytes.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Writes some data into this Hasher. Read more
Returns the hash value for the values written so far. Read more
Writes a single u8 into this hasher.
Writes a single u16 into this hasher.
Writes a single u32 into this hasher.
Writes a single u64 into this hasher.
Writes a single u128 into this hasher.
Writes a single usize into this hasher.
Writes a single i8 into this hasher.
Writes a single i16 into this hasher.
Writes a single i32 into this hasher.
Writes a single i64 into this hasher.
Writes a single i128 into this hasher.
Writes a single isize into this hasher.
🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a length prefix into this hasher, as part of being prefix-free. Read more
🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a single str into this hasher. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.