pub enum Typecode {
Data(DataTypecode),
Metadata(MetadataTypecode),
}Expand description
The known Receiver and Viewing Key types.
This typecode covers both data items (receivers, viewing keys) and metadata items as defined in ZIP 316.
The typecodes 0xFFFA..=0xFFFF reserved for experiments are currently not
distinguished from unknown values, and will be parsed as Typecode::Data(DataTypecode::Unknown).
Variants§
Data(DataTypecode)
A data item (receiver or viewing key).
Metadata(MetadataTypecode)
A metadata item.
Implementations§
Source§impl Typecode
impl Typecode
Sourcepub fn typecode_value(&self) -> u32
pub fn typecode_value(&self) -> u32
Returns the numeric typecode value.
pub fn preference_order(a: &Self, b: &Self) -> Ordering
pub fn encoding_order(a: &Self, b: &Self) -> Ordering
pub fn is_transparent_data(&self) -> bool
Trait Implementations§
impl Copy for Typecode
impl Eq for Typecode
Source§impl From<DataTypecode> for Typecode
impl From<DataTypecode> for Typecode
Source§fn from(tc: DataTypecode) -> Self
fn from(tc: DataTypecode) -> 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.
impl StructuralPartialEq for Typecode
Auto Trait Implementations§
impl Freeze for Typecode
impl RefUnwindSafe for Typecode
impl Send for Typecode
impl Sync for Typecode
impl Unpin for Typecode
impl UnsafeUnpin for Typecode
impl UnwindSafe for Typecode
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