Enum grin_keychain::extkey_bip32::ChildNumber
source · pub enum ChildNumber {
Normal {
index: u32,
},
Hardened {
index: u32,
},
}
Expand description
A child number for a derived key
Variants§
Implementations§
source§impl ChildNumber
impl ChildNumber
sourcepub fn from_normal_idx(index: u32) -> Self
pub fn from_normal_idx(index: u32) -> Self
Create a Normal
from an index, panics if the index is not within
[0, 2^31 - 1].
sourcepub fn from_hardened_idx(index: u32) -> Self
pub fn from_hardened_idx(index: u32) -> Self
Create a Hardened
from an index, panics if the index is not within
[0, 2^31 - 1].
sourcepub fn is_hardened(self) -> bool
pub fn is_hardened(self) -> bool
Returns true
if the child number is a Hardened
value.
Trait Implementations§
source§impl Clone for ChildNumber
impl Clone for ChildNumber
source§fn clone(&self) -> ChildNumber
fn clone(&self) -> ChildNumber
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ChildNumber
impl Debug for ChildNumber
source§impl<'de> Deserialize<'de> for ChildNumber
impl<'de> Deserialize<'de> for ChildNumber
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
source§impl Display for ChildNumber
impl Display for ChildNumber
source§impl From<ChildNumber> for u32
impl From<ChildNumber> for u32
source§fn from(cnum: ChildNumber) -> Self
fn from(cnum: ChildNumber) -> Self
Converts to this type from the input type.
source§impl From<u32> for ChildNumber
impl From<u32> for ChildNumber
source§impl PartialEq for ChildNumber
impl PartialEq for ChildNumber
source§fn eq(&self, other: &ChildNumber) -> bool
fn eq(&self, other: &ChildNumber) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ChildNumber
impl Serialize for ChildNumber
impl Copy for ChildNumber
impl Eq for ChildNumber
impl StructuralPartialEq for ChildNumber
Auto Trait Implementations§
impl Freeze for ChildNumber
impl RefUnwindSafe for ChildNumber
impl Send for ChildNumber
impl Sync for ChildNumber
impl Unpin for ChildNumber
impl UnwindSafe for ChildNumber
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.