pub trait Hashablewhere
Self: TryIntoByteVec,{
// Provided method
fn try_hash(
value: Arc<Self>,
algorithm: HashAlgorithm,
) -> Result<Arc<Hash>, SerialiseError> { ... }
}Expand description
Hashable trait
Provided Methods§
Sourcefn try_hash(
value: Arc<Self>,
algorithm: HashAlgorithm,
) -> Result<Arc<Hash>, SerialiseError>
fn try_hash( value: Arc<Self>, algorithm: HashAlgorithm, ) -> Result<Arc<Hash>, SerialiseError>
Encodes this type using the specified Encoding.
§Parameters
value- The value to encodeencoding- The encoding to use when encoding this type.
§Returns
A Result containing the encoded string if successful, or a SerialiseError if an error occurs.
§Errors
SerialiseError- If the specified encoding is unsupported or an error occurs during serialisation.
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.