pub struct Digest { /* private fields */ }
Expand description
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.
Implementations
Trait Implementations
sourceimpl FromStr for Digest
impl FromStr for Digest
type Err = DigestParseError
type Err = DigestParseError
The associated error which can be returned from parsing.
sourcefn from_str(s: &str) -> Result<Digest, DigestParseError>
fn from_str(s: &str) -> Result<Digest, DigestParseError>
Parses a string
s
to return a value of this type. Read moresourceimpl Hash for Digest
impl Hash for Digest
sourcefn hash<__H>(&self, state: &mut __H)where
__H: Hasher,
fn hash<__H>(&self, state: &mut __H)where
__H: Hasher,
Feeds this value into the given [
Hasher
]. Read more1.3.0fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Feeds a slice of this type into the given [
Hasher
]. Read moresourceimpl Ord for Digest
impl Ord for Digest
sourceimpl PartialOrd<Digest> for Digest
impl PartialOrd<Digest> for Digest
impl Copy for Digest
impl Eq for Digest
impl StructuralEq for Digest
impl StructuralPartialEq for Digest
Auto Trait Implementations
impl RefUnwindSafe for Digest
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnwindSafe for Digest
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more