pub enum MetadataTypecode {
ExpiryHeight,
ExpiryTime,
Unknown(u32),
}Expand description
Typecodes for metadata items (0xC0..=0xFC).
Variants§
ExpiryHeight
Expiry height (typecode 0xE0). 4-byte little-endian block height.
ExpiryTime
Expiry time (typecode 0xE1). 8-byte little-endian Unix timestamp.
Unknown(u32)
An unknown metadata typecode.
Implementations§
Source§impl MetadataTypecode
impl MetadataTypecode
Sourcepub fn is_must_understand(&self) -> bool
pub fn is_must_understand(&self) -> bool
Returns whether ZIP 316 requires a reader to understand a metadata item of this type. A reader that does not understand such an item must reject the container that holds it, so the item cannot be dropped without changing the meaning of the container.
Trait Implementations§
Source§impl Clone for MetadataTypecode
impl Clone for MetadataTypecode
impl Copy for MetadataTypecode
Source§impl Debug for MetadataTypecode
impl Debug for MetadataTypecode
impl Eq for MetadataTypecode
Source§impl From<MetadataTypecode> for u32
impl From<MetadataTypecode> for u32
Source§fn from(t: MetadataTypecode) -> Self
fn from(t: MetadataTypecode) -> Self
Converts to this type from the input type.
Source§impl From<MetadataTypecode> for Typecode
impl From<MetadataTypecode> for Typecode
Source§fn from(tc: MetadataTypecode) -> Self
fn from(tc: MetadataTypecode) -> Self
Converts to this type from the input type.
Source§impl Hash for MetadataTypecode
impl Hash for MetadataTypecode
Source§impl PartialEq for MetadataTypecode
impl PartialEq for MetadataTypecode
impl StructuralPartialEq for MetadataTypecode
Auto Trait Implementations§
impl Freeze for MetadataTypecode
impl RefUnwindSafe for MetadataTypecode
impl Send for MetadataTypecode
impl Sync for MetadataTypecode
impl Unpin for MetadataTypecode
impl UnsafeUnpin for MetadataTypecode
impl UnwindSafe for MetadataTypecode
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