pub trait Digest: Display {
// Provided methods
fn as_bytes(&self) -> &[u8] ⓘ
where Self: AsRef<[u8]> { ... }
fn to_hex_lowercase(&self) -> String
where Self: LowerHex { ... }
fn to_hex_uppercase(&self) -> String
where Self: UpperHex { ... }
}
Expand description
A trait for hash digests.
This trait defines the common interface for hash digests, providing methods for converting the digest into various representations.
Provided Methods§
Sourcefn to_hex_lowercase(&self) -> Stringwhere
Self: LowerHex,
fn to_hex_lowercase(&self) -> Stringwhere
Self: LowerHex,
Returns the digest as a lowercase hexadecimal string.
Sourcefn to_hex_uppercase(&self) -> Stringwhere
Self: UpperHex,
fn to_hex_uppercase(&self) -> Stringwhere
Self: UpperHex,
Returns the digest as an uppercase hexadecimal string.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.