pub struct Data {
pub value: Bytes,
pub validity_type: ValidityType,
pub validity: Bytes,
pub sequence: u64,
pub ttl: u64,
pub metadata: BTreeMap<String, Ipld>,
}Fields§
§value: Bytes§validity_type: ValidityType§validity: Bytes§sequence: u64§ttl: u64§metadata: BTreeMap<String, Ipld>Additional non-standard metadata keys carried in the dag-cbor map. Empty for typical records; preserved verbatim on decode/encode and covered by the V2 signature.
Implementations§
Source§impl Data
impl Data
pub fn value(&self) -> &[u8] ⓘ
Sourcepub fn metadata(&self) -> &BTreeMap<String, Ipld>
pub fn metadata(&self) -> &BTreeMap<String, Ipld>
Non-standard metadata keys carried alongside the reserved IPNS fields.
pub fn validity_type(&self) -> ValidityType
pub fn validity(&self) -> &[u8] ⓘ
pub fn sequence(&self) -> u64
pub fn ttl(&self) -> u64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Data
impl<'de> Deserialize<'de> for Data
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnsafeUnpin for Data
impl UnwindSafe for Data
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