Struct mhash::MultiHash [] [src]

pub struct MultiHash { /* fields omitted */ }

A decoded multihash.

Methods

impl MultiHash
[src]

Create a new multihash with the specified variant and digest. Validates the length of the digest is consistent with the multihash variant.

Create a new multihash with the specified code and digest, validates that the code is known or an application specific variant, and that the length is consistent with the multihash variant the code refers to.

The length of this multihash's digest.

This multihash's variant.

The code specifying this multihash variant.

The string representation of this multihash type.

A reference to the bytes making up the digest of this multihash.

impl MultiHash
[src]

Parse a binary encoded multihash

impl MultiHash
[src]

Create a Vec<u8> with the binary encoding of this multihash.

The length this multihash will use when serialized to a byte array/stream.

Trait Implementations

impl Eq for MultiHash
[src]

impl PartialEq for MultiHash
[src]

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

This method tests for !=.

impl Clone for MultiHash
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for MultiHash
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for MultiHash
[src]

Formats the value using the given formatter.

impl Display for MultiHash
[src]

Formats the value using the given formatter. Read more

impl FromStr for MultiHash
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more