[][src]Enum ipfs::ipld::Ipld

pub enum Ipld {
    Null,
    Bool(bool),
    Integer(i128),
    Float(f64),
    String(String),
    Bytes(Vec<u8>),
    List(Vec<Ipld>),
    Map(BTreeMap<String, Ipld>),
    Link(Cid),
}

Ipld

Variants

Null

Represents the absence of a value or the value undefined.

Bool(bool)

Represents a boolean value.

Integer(i128)

Represents an integer.

Float(f64)

Represents a floating point value.

String(String)

Represents an UTF-8 string.

Bytes(Vec<u8>)

Represents a sequence of bytes.

List(Vec<Ipld>)

Represents a list.

Represents a map.

Represents a link to an Ipld node

Implementations

impl Ipld[src]

pub fn get<'a, T: Into<IpldIndex<'a>>>(&self, index: T) -> Option<&Ipld>[src]

Indexes into a ipld list or map.

pub fn iter(&self) -> IpldIter<'_>

Notable traits for IpldIter<'a>

impl<'a> Iterator for IpldIter<'a> type Item = &'a Ipld;
[src]

Returns an iterator.

Trait Implementations

impl Clone for Ipld[src]

impl Debug for Ipld[src]

impl<'_> From<&'_ [u8]> for Ipld[src]

impl<'_> From<&'_ CidGeneric<Codec, Code>> for Ipld[src]

impl<'_> From<&'_ str> for Ipld[src]

impl From<BTreeMap<String, Ipld>> for Ipld[src]

impl From<CidGeneric<Codec, Code>> for Ipld[src]

impl From<String> for Ipld[src]

impl From<Vec<Ipld>> for Ipld[src]

impl From<Vec<u8>> for Ipld[src]

impl From<bool> for Ipld[src]

impl From<f32> for Ipld[src]

impl From<f64> for Ipld[src]

impl From<i128> for Ipld[src]

impl From<i16> for Ipld[src]

impl From<i32> for Ipld[src]

impl From<i64> for Ipld[src]

impl From<i8> for Ipld[src]

impl From<isize> for Ipld[src]

impl From<u16> for Ipld[src]

impl From<u32> for Ipld[src]

impl From<u64> for Ipld[src]

impl From<u8> for Ipld[src]

impl From<usize> for Ipld[src]

impl Into<Ipld> for PbNode[src]

impl Into<Ipld> for PbLink[src]

impl PartialEq<Ipld> for Ipld[src]

impl ReadCbor for Ipld[src]

impl StructuralPartialEq for Ipld[src]

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

type Error = IpldError

The type returned in the event of a conversion error.

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

type Error = IpldError

The type returned in the event of a conversion error.

impl TryFrom<ResolvedNode> for Ipld[src]

type Error = ResolveError

The type returned in the event of a conversion error.

impl WriteCbor for Ipld[src]

Auto Trait Implementations

impl RefUnwindSafe for Ipld

impl Send for Ipld

impl Sync for Ipld

impl Unpin for Ipld

impl UnwindSafe for Ipld

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> Instrument for T[src]

impl<T> Instrument 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> 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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]