Hashed

Trait Hashed 

Source
pub trait Hashed:
    Display
    + Debug
    + Sized
    + Eq
    + PartialEq {
Show 16 methods // Required methods fn as_slice(&self) -> &[u8] ; fn from_slice(hash: &[u8]) -> Result<Self>; fn from_byte_array(hash: ByteArray) -> Result<Self>; fn function() -> Function; fn digest_slice(msg: &[u8]) -> Arc<[u8]>; fn named(self, name: impl Into<Cow<'static, str>>) -> Self; fn as_byte_array(&self) -> &ByteArray; fn into_byte_array(self) -> ByteArray; // Provided methods fn digest(msg: impl Into<ByteArray>) -> Self { ... } fn from_hex_le(s: &str) -> Result<Self> { ... } fn from_hex_be(s: &str) -> Result<Self> { ... } fn from_slice_le(hash_le: &[u8]) -> Result<Self> { ... } fn to_vec_le(&self) -> Vec<u8> { ... } fn to_hex_le(&self) -> String { ... } fn to_hex_be(&self) -> String { ... } fn concat(self, other: impl Into<ByteArray>) -> ByteArray { ... }
}

Required Methods§

Source

fn as_slice(&self) -> &[u8]

Source

fn from_slice(hash: &[u8]) -> Result<Self>

Source

fn from_byte_array(hash: ByteArray) -> Result<Self>

Source

fn function() -> Function

Source

fn digest_slice(msg: &[u8]) -> Arc<[u8]>

Source

fn named(self, name: impl Into<Cow<'static, str>>) -> Self

Source

fn as_byte_array(&self) -> &ByteArray

Source

fn into_byte_array(self) -> ByteArray

Provided Methods§

Source

fn digest(msg: impl Into<ByteArray>) -> Self

Source

fn from_hex_le(s: &str) -> Result<Self>

Source

fn from_hex_be(s: &str) -> Result<Self>

Source

fn from_slice_le(hash_le: &[u8]) -> Result<Self>

Source

fn to_vec_le(&self) -> Vec<u8>

Source

fn to_hex_le(&self) -> String

Source

fn to_hex_be(&self) -> String

Source

fn concat(self, other: impl Into<ByteArray>) -> ByteArray

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.

Implementors§