[][src]Struct libipld_pb::PbNode

pub struct PbNode {
    pub links: Vec<PbLink>,
    pub data: Box<[u8]>,
}

A protobuf ipld node.

Fields

links: Vec<PbLink>

List of protobuf ipld links.

data: Box<[u8]>

Binary data blob.

Implementations

impl PbNode[src]

pub fn from_bytes(bytes: &[u8]) -> Result<Self>[src]

Deserializes a PbNode from bytes.

pub fn into_bytes(self) -> Box<[u8]>[src]

Serializes a PbNode to bytes.

Trait Implementations

impl Into<Ipld> for PbNode[src]

impl<'_> TryFrom<&'_ Ipld> for PbNode[src]

type Error = TypeError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for PbNode

impl Send for PbNode

impl Sync for PbNode

impl Unpin for PbNode

impl UnwindSafe for PbNode

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.