Skip to main content

ToMultihash

Trait ToMultihash 

Source
pub trait ToMultihash {
    // Required methods
    fn to_multihash(&self) -> Multihash;
    fn to_multihash_by_code(&self, code: MultihashCode) -> Multihash;
}
Expand description

Helper trait for converting to multihash.

Required Methods§

Source

fn to_multihash(&self) -> Multihash

Convert to multihash by the default multihash code.

Source

fn to_multihash_by_code(&self, code: MultihashCode) -> Multihash

Convert to multihash by the specified multihash code.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToMultihash for PieceIndex

Implementors§