[][src]Struct crc32fast::Hasher

pub struct Hasher { /* fields omitted */ }

Represents an in-progress CRC32 computation.

Implementations

impl Hasher[src]

pub fn new() -> Self[src]

Create a new Hasher.

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

pub fn new_with_initial(init: u32) -> Self[src]

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.

pub fn update(&mut self, buf: &[u8])[src]

Process the given byte slice and update the hash state.

pub fn finalize(self) -> u32[src]

Finalize the hash state and return the computed CRC32 value.

pub fn reset(&mut self)[src]

Reset the hash state.

pub fn combine(&mut self, other: &Self)[src]

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

Trait Implementations

impl Clone for Hasher[src]

impl Debug for Hasher[src]

impl Default for Hasher[src]

impl Hasher for Hasher[src]

Auto Trait Implementations

impl RefUnwindSafe for Hasher

impl Send for Hasher

impl Sync for Hasher

impl Unpin for Hasher

impl UnwindSafe for Hasher

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.