Struct Adler32

struct Adler32 { ... }

An adler32 hash generator type.

Implementations

impl Adler32

fn new() -> Self

Constructs a new Adler32.

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

Examples

use simd_adler32::Adler32;

let mut adler = Adler32::new();
fn from_checksum(checksum: u32) -> Self

Constructs a new Adler32 using existing checksum.

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

Examples

use simd_adler32::Adler32;

let mut adler = Adler32::from_checksum(0xdeadbeaf);
fn write(self: &mut Self, data: &[u8])

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

fn finish(self: &Self) -> u32

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.

fn reset(self: &mut Self)

Resets the internal state.

impl Clone for Adler32

fn clone(self: &Self) -> Adler32

impl Default for Adler32

fn default() -> Self

impl Freeze for Adler32

impl RefUnwindSafe for Adler32

impl Send for Adler32

impl Sync for Adler32

impl Unpin for Adler32

impl UnsafeUnpin for Adler32

impl UnwindSafe for Adler32

impl<T> Any for Adler32

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Adler32

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Adler32

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Adler32

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Adler32

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Adler32

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for Adler32

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for Adler32

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Adler32

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>