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
pub fn deserialize<D>(
deserializer: D
) -> Result<Digest, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<Digest, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type Err = DigestParseError
type Err = DigestParseError
The associated error which can be returned from parsing.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Digest
impl UnwindSafe for Digest
Blanket Implementations
Mutably borrows from an owned value. Read more