[go: up one dir, main page]

Struct cid::Cid [] [src]

pub struct Cid {
    pub version: u64,
    pub codec: Codec,
    pub hash: Vec<u8>,
}

Representation of a CID.

Fields

Methods

impl Cid
[src]

Create a new CID.

Create a new CID from a prefix and some data.

Trait Implementations

impl PartialEq for Cid
[src]

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

This method tests for !=.

impl Eq for Cid
[src]

impl Clone for Cid
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Cid
[src]

Formats the value using the given formatter.

impl TryFrom<Vec<u8>> for Cid
[src]

Create a Cid from a u8 vector.

impl TryFrom<String> for Cid
[src]

Create a Cid from a string.

impl<'a> TryFrom<&'a str> for Cid
[src]

Create a Cid from a string slice.

impl<'a> TryFrom<&'a [u8]> for Cid
[src]

Create a Cid from a byte slice.

impl Display for Cid
[src]

Formats the value using the given formatter.