[][src]Enum grin_keychain::extkey_bip32::ChildNumber

pub enum ChildNumber {
    Normal {
        index: u32,
    },
    Hardened {
        index: u32,
    },
}

A child number for a derived key

Variants

Normal

Non-hardened key

Fields of Normal

index: u32

Key index, within [0, 2^31 - 1]

Hardened

Hardened key

Fields of Hardened

index: u32

Key index, within [0, 2^31 - 1]

Methods

impl ChildNumber[src]

pub fn from_normal_idx(index: u32) -> Self[src]

Create a Normal from an index, panics if the index is not within [0, 2^31 - 1].

pub fn from_hardened_idx(index: u32) -> Self[src]

Create a Hardened from an index, panics if the index is not within [0, 2^31 - 1].

pub fn is_normal(&self) -> bool[src]

Returns true if the child number is a Normal value.

pub fn is_hardened(&self) -> bool[src]

Returns true if the child number is a Hardened value.

Trait Implementations

impl From<u32> for ChildNumber[src]

impl From<ChildNumber> for u32[src]

impl Clone for ChildNumber[src]

impl Copy for ChildNumber[src]

impl Eq for ChildNumber[src]

impl PartialEq<ChildNumber> for ChildNumber[src]

impl Display for ChildNumber[src]

impl Debug for ChildNumber[src]

impl Serialize for ChildNumber[src]

impl<'de> Deserialize<'de> for ChildNumber[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> UnsafeAny for T where
    T: Any

impl<T> Erased for T

impl<T> Same<T> for T

type Output = T

Should always be Self