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.
Trait Implementations§
Source§impl From<&Ipld> for TypeErrorType
impl From<&Ipld> for TypeErrorType
Source§impl From<Ipld> for TypeErrorType
impl From<Ipld> for TypeErrorType
impl StructuralPartialEq for Ipld
Auto Trait Implementations§
impl Freeze for Ipld
impl RefUnwindSafe for Ipld
impl Send for Ipld
impl Sync for Ipld
impl Unpin for Ipld
impl UnwindSafe for Ipld
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more