pub enum DataTypecode {
P2pkh,
P2sh,
Sapling,
Orchard,
Unknown(u32),
}Expand description
Typecodes for data items (receivers / viewing keys).
The derived ordering coincides with ascending typecode value order (the canonical
encoding order of the corresponding items) for all values constructible by this
crate’s parsers, as an Unknown typecode never holds a known code’s value.
Variants§
P2pkh
A transparent P2PKH address, FVK, or IVK encoding as specified in ZIP 316.
P2sh
In an address, a transparent P2SH address as specified in ZIP 316.
In a Revision 2 viewing key, a P2SH viewing key item: the encoding of a BIP 388 wallet policy, whose descriptor template and key information vector together determine the redeem script a P2SH receiver is derived from. Revision 0 assigns this typecode no meaning in a viewing key.
Sapling
A Sapling raw address, FVK, or IVK encoding as specified in ZIP 316.
Orchard
An Orchard raw address, FVK, or IVK encoding as specified in ZIP 316.
Unknown(u32)
An unknown data typecode.
Implementations§
Source§impl DataTypecode
impl DataTypecode
pub fn is_transparent(&self) -> bool
pub fn preference_order(a: &Self, b: &Self) -> Ordering
Trait Implementations§
Source§impl Clone for DataTypecode
impl Clone for DataTypecode
Source§fn clone(&self) -> DataTypecode
fn clone(&self) -> DataTypecode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DataTypecode
Source§impl Debug for DataTypecode
impl Debug for DataTypecode
impl Eq for DataTypecode
Source§impl From<DataTypecode> for u32
impl From<DataTypecode> for u32
Source§fn from(t: DataTypecode) -> Self
fn from(t: DataTypecode) -> Self
Source§impl From<DataTypecode> for Typecode
impl From<DataTypecode> for Typecode
Source§fn from(tc: DataTypecode) -> Self
fn from(tc: DataTypecode) -> Self
Source§impl Hash for DataTypecode
impl Hash for DataTypecode
Source§impl Ord for DataTypecode
impl Ord for DataTypecode
Source§fn cmp(&self, other: &DataTypecode) -> Ordering
fn cmp(&self, other: &DataTypecode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DataTypecode
impl PartialEq for DataTypecode
Source§impl PartialOrd for DataTypecode
impl PartialOrd for DataTypecode
impl StructuralPartialEq for DataTypecode
Auto Trait Implementations§
impl Freeze for DataTypecode
impl RefUnwindSafe for DataTypecode
impl Send for DataTypecode
impl Sync for DataTypecode
impl Unpin for DataTypecode
impl UnsafeUnpin for DataTypecode
impl UnwindSafe for DataTypecode
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
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> ⓘ
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> ⓘ
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