[][src]Struct sha1::Digest

pub struct Digest { /* fields omitted */ }

Digest generated from a Sha1 instance.

A digest can be formatted to view the digest as a hex string, or the bytes can be extracted for later processing.

To retrieve a hex string result call to_string on it (requires that std is available).

If the serde feature is enabled a digest can also be serialized and deserialized. Likewise a digest can be parsed from a hex string.

Methods

impl Digest[src]

pub fn bytes(&self) -> [u8; 20][src]

Returns the 160 bit (20 byte) digest as a byte array.

Trait Implementations

impl PartialEq<Digest> for Digest[src]

impl Eq for Digest[src]

impl Ord for Digest[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<Digest> for Digest[src]

impl Hash for Digest[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Digest[src]

impl Debug for Digest[src]

impl FromStr for Digest[src]

type Err = DigestParseError

The associated error which can be returned from parsing.

impl Copy for Digest[src]

impl Clone for Digest[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Digest[src]

Auto Trait Implementations

impl Unpin for Digest

impl Send for Digest

impl Sync for Digest

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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