pub enum MetadataItem {
ExpiryHeight(u32),
ExpiryTime(u64),
Unknown {
typecode: u32,
data: Vec<u8>,
},
}Expand description
A parsed metadata item.
Variants§
ExpiryHeight(u32)
An expiry height, encoded as a 4-byte little-endian block height.
ExpiryTime(u64)
An expiry time, encoded as an 8-byte little-endian Unix timestamp.
Unknown
An unknown metadata item.
Implementations§
Source§impl MetadataItem
impl MetadataItem
Sourcepub fn typecode(&self) -> MetadataTypecode
pub fn typecode(&self) -> MetadataTypecode
Returns the typecode for this metadata item.
Sourcepub fn combined_typecode(&self) -> Typecode
pub fn combined_typecode(&self) -> Typecode
Returns the combined typecode for this metadata item.
Trait Implementations§
Source§impl Clone for MetadataItem
impl Clone for MetadataItem
Source§impl Debug for MetadataItem
impl Debug for MetadataItem
impl Eq for MetadataItem
Source§impl Hash for MetadataItem
impl Hash for MetadataItem
Source§impl PartialEq for MetadataItem
impl PartialEq for MetadataItem
impl StructuralPartialEq for MetadataItem
Auto Trait Implementations§
impl Forget for MetadataItem
impl Freeze for MetadataItem
impl Move for MetadataItem
impl RefUnwindSafe for MetadataItem
impl Send for MetadataItem
impl Sync for MetadataItem
impl Unpin for MetadataItem
impl UnsafeUnpin for MetadataItem
impl UnwindSafe for MetadataItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more