[][src]Struct scid::Sscid

pub struct Sscid {
    pub version: Version,
    pub codec: Codec,
    pub hash: Vec<u8>,
}

Representation of a SCID.

Fields

version: Versioncodec: Codechash: Vec<u8>

Methods

impl Sscid[src]

pub fn new(codec: Codec, version: Version, hash: &[u8]) -> Sscid[src]

Create a new SCID.

pub fn from<T: ToSscid>(data: T) -> Result<Sscid>[src]

Create a new SCID from raw data (binary or multibase encoded string)

pub fn new_from_prefix(prefix: &Prefix, data: &[u8]) -> Sscid[src]

Create a new SCID from a prefix and some data.

pub fn to_string(&self) -> String[src]

pub fn to_bytes(&self) -> Vec<u8>[src]

pub fn prefix(&self) -> Prefix[src]

Trait Implementations

impl Clone for Sscid[src]

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

Performs copy-assignment from source. Read more

impl Eq for Sscid[src]

impl PartialEq<Sscid> for Sscid[src]

impl Debug for Sscid[src]

impl Display for Sscid[src]

impl FromStr for Sscid[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for Sscid[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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

Auto Trait Implementations

impl Send for Sscid

impl Sync for Sscid

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self