Trait MarkedDigestOutput

Source
pub trait MarkedDigestOutput:
    Default
    + Copy
    + AsRef<[u8]>
    + AsMut<[u8]>
    + ByteFormat<Error = SerError> {
    // Required method
    fn size(&self) -> usize;

    // Provided methods
    fn reversed(&self) -> Self { ... }
    fn from_be_hex(be: &str) -> SerResult<Self> { ... }
    fn to_be_hex(&self) -> String { ... }
    fn as_mut_slice(&mut self) -> &mut [u8]  { ... }
    fn as_slice(&self) -> &[u8]  { ... }
}
Expand description

Convenience interface for hash function outputs, particularly marked digest outputs

Required Methods§

Source

fn size(&self) -> usize

Returns the number of bytes in the digest

Provided Methods§

Source

fn reversed(&self) -> Self

Return a clone in opposite byte order

Source

fn from_be_hex(be: &str) -> SerResult<Self>

Deserialize to BE hex

Source

fn to_be_hex(&self) -> String

Convert to BE hex

Source

fn as_mut_slice(&mut self) -> &mut [u8]

Use as a mutable slice

Source

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

Use as a slice

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§