Struct simd_adler32::Adler32[][src]

pub struct Adler32 { /* fields omitted */ }

A rolling hash generator type.

Implementations

impl Adler32[src]

pub fn new() -> Self[src]

Constructs a new Adler32.

Examples

use simd_adler32::Adler32;

let mut adler = Adler32::new();

Remarks

Potential overhead here due to runtime feature detection although in testing on 100k and 10k random byte arrays it was not really noticeable.

pub fn write(&mut self, data: &[u8])[src]

Computes hash for supplied data and stores results in internal state.

pub fn finish(&self) -> u32[src]

Returns the hash value for the values written so far.

Despite its name, the method does not reset the hasher’s internal state. Additional writes will continue from the current value. If you need to start a fresh hash value, you will have to use reset.

pub fn reset(&mut self)[src]

Resets the internal state.

Trait Implementations

impl Clone for Adler32[src]

impl Default for Adler32[src]

Auto Trait Implementations

impl RefUnwindSafe for Adler32

impl Send for Adler32

impl Sync for Adler32

impl Unpin for Adler32

impl UnwindSafe for Adler32

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.