Trait StreamRefExt

Source
pub trait StreamRefExt {
    // Required methods
    fn stream_type(&self) -> StreamType;
    fn cid(&self) -> &Cid;
    fn at_commit(&self, commit: Cid) -> CommitId;
    fn to_base_id(&self) -> StreamId;
    fn to_bytes(&self) -> Vec<u8> ;

    // Provided methods
    fn to_base36_string(&self) -> String { ... }
    fn to_url(&self) -> String { ... }
}

Required Methods§

Source

fn stream_type(&self) -> StreamType

Get the StreamType.

Source

fn cid(&self) -> &Cid

Get the genesis Cid.

Source

fn at_commit(&self, commit: Cid) -> CommitId

Create a new CommitId at the given commit.

Source

fn to_base_id(&self) -> StreamId

Get the StreamId without the commit.

Source

fn to_bytes(&self) -> Vec<u8>

Encode the StreamRef into bytes.

Provided Methods§

Source

fn to_base36_string(&self) -> String

Encode the StreamRef into a string.

Source

fn to_url(&self) -> String

Encode the StreamRef into a base36 URL.

Implementors§