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