Enum libipld::ipld::Ipld [−][src]
pub enum Ipld { Null, Bool(bool), Integer(i128), Float(f64), String(String), Bytes(Vec<u8, Global>), List(Vec<Ipld, Global>), StringMap(BTreeMap<String, Ipld>), Link(Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>), }
Expand description
Ipld
Variants
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.
Represents a sequence of bytes.
Represents a list.
Represents a map of strings.
Represents a link to an Ipld node.
Implementations
impl Ipld
[src]
impl Ipld
[src]pub fn take<'a, T>(self, index: T) -> Result<Ipld, TypeError> where
T: Into<IpldIndex<'a>>,
[src]
pub fn take<'a, T>(self, index: T) -> Result<Ipld, TypeError> where
T: Into<IpldIndex<'a>>,
[src]Destructs an ipld list or map
pub fn get<'a, T>(&self, index: T) -> Result<&Ipld, TypeError> where
T: Into<IpldIndex<'a>>,
[src]
pub fn get<'a, T>(&self, index: T) -> Result<&Ipld, TypeError> where
T: Into<IpldIndex<'a>>,
[src]Indexes into an ipld list or map.
Trait Implementations
impl Decode<DagCborCodec> for Ipld
[src]
impl Decode<DagCborCodec> for Ipld
[src]impl Decode<DagJsonCodec> for Ipld
[src]
impl Decode<DagJsonCodec> for Ipld
[src]impl Decode<DagPbCodec> for Ipld
[src]
impl Decode<DagPbCodec> for Ipld
[src]impl Encode<DagCborCodec> for Ipld
[src]
impl Encode<DagCborCodec> for Ipld
[src]impl Encode<DagJsonCodec> for Ipld
[src]
impl Encode<DagJsonCodec> for Ipld
[src]impl Encode<DagPbCodec> for Ipld
[src]
impl Encode<DagPbCodec> for Ipld
[src]impl<'_> From<&'_ Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>> for Ipld
[src]
impl<'_> From<&'_ Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>> for Ipld
[src]impl<'_> From<&'_ Ipld> for TypeErrorType
[src]
impl<'_> From<&'_ Ipld> for TypeErrorType
[src]pub fn from(ipld: &Ipld) -> TypeErrorType
[src]
pub fn from(ipld: &Ipld) -> TypeErrorType
[src]Performs the conversion.
impl From<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>> for Ipld
[src]
impl From<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>> for Ipld
[src]impl From<Ipld> for TypeErrorType
[src]
impl From<Ipld> for TypeErrorType
[src]pub fn from(ipld: Ipld) -> TypeErrorType
[src]
pub fn from(ipld: Ipld) -> TypeErrorType
[src]Performs the conversion.
impl References<DagCborCodec> for Ipld
[src]
impl References<DagCborCodec> for Ipld
[src]impl References<DagJsonCodec> for Ipld
[src]
impl References<DagJsonCodec> for Ipld
[src]impl References<DagPbCodec> for Ipld
[src]
impl References<DagPbCodec> for Ipld
[src]impl References<IpldCodec> for Ipld
[src]
impl References<IpldCodec> for Ipld
[src]impl StructuralPartialEq 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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> References<RawCodec> for T
[src]
impl<T> References<RawCodec> for T
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DagCbor for T where
T: Encode<DagCborCodec> + Decode<DagCborCodec>,
[src]
T: Encode<DagCborCodec> + Decode<DagCborCodec>,