Enum multihash::HashTypes [] [src]

pub enum HashTypes {
    SHA1,
    SHA2256,
    SHA2512,
    SHA3,
    Blake2b,
    Blake2s,
}

List of types currently supported in the multihash spec.

Not all hash types are supported by this library.

Variants

SHA1

Encoding unsupported

SHA2256

SHA-256 (32-byte hash size)

SHA2512

SHA-512 (64-byte hash size)

SHA3

Encoding unsupported

Blake2b

Encoding unsupported

Blake2s

Encoding unsupported

Methods

impl HashTypes
[src]

fn code(&self) -> u8

Get the corresponding hash code

fn size(&self) -> u8

Get the hash length in bytes

fn name(&self) -> &str

Get the human readable name

fn from_code(code: u8) -> Option<HashTypes>

Trait Implementations

impl Debug for HashTypes
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for HashTypes
[src]

fn clone(&self) -> HashTypes

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Eq for HashTypes
[src]

impl PartialEq for HashTypes
[src]

fn eq(&self, __arg_0: &HashTypes) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.