pub enum Ipld {
Null,
Bool(bool),
Integer(i128),
Float(f64),
String(String),
Bytes(Vec<u8, Global>),
List(Vec<Ipld, Global>),
Map(BTreeMap<String, Ipld, Global>),
Link(Cid<64>),
}
Expand description
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, Global>)
Represents a sequence of bytes.
List(Vec<Ipld, Global>)
Represents a list.
Map(BTreeMap<String, Ipld, Global>)
Represents a map of strings.
Link(Cid<64>)
Represents a map of integers.
Implementations§
§impl Ipld
impl Ipld
pub fn take<'a, T>(self, index: T) -> Result<Ipld, TypeError>where
T: Into<IpldIndex<'a>>,
pub fn take<'a, T>(self, index: T) -> Result<Ipld, TypeError>where
T: Into<IpldIndex<'a>>,
Destructs an ipld list or map
pub fn get<'a, T>(&self, index: T) -> Result<&Ipld, TypeError>where
T: Into<IpldIndex<'a>>,
pub fn get<'a, T>(&self, index: T) -> Result<&Ipld, TypeError>where
T: Into<IpldIndex<'a>>,
Indexes into an ipld list or map.
pub fn iter(&self) -> IpldIter<'_>
pub fn iter(&self) -> IpldIter<'_>
Returns an iterator.
pub fn references<E>(&self, set: &mut E)where
E: Extend<Cid<64>>,
pub fn references<E>(&self, set: &mut E)where
E: Extend<Cid<64>>,
Returns the references to other blocks.