[−][src]Struct inc_sha1::Hasher
An in-progress SHA-1 hash operation.
This struct’s API is intentionally similar to std::hash::Hasher
in an
attempt at familiarity; however, it does not actually implement that trait because that trait
only permits 64-bit hash outputs, while SHA-1 has a 160-bit output.
A Hasher
can be cloned and copied. Doing so yields a second Hasher
which acts as if it has
had exactly the same sequence of bytes written to it as the original, but can freely diverge
from that point forward.
Implementations
impl Hasher
[src]
#[must_use]pub fn new() -> Self
[src]
Constructs a new Hasher
.
The new Hasher
does not yet contain any data.
pub fn write(&mut self, bytes: &[u8])
[src]
Adds data to a Hasher
.
#[must_use]pub fn finish(&self) -> Hash
[src]
Returns the hash of the data written so far.
The Hasher
is still usable after this, and more data can be added if desired.
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,