[][src]Struct hdwallet::key_chain::chain_path::ChainPath

pub struct ChainPath(_);

ChainPath is used to describe BIP-32 KeyChain path.

Examples

use hdwallet::{ChainPath, SubPath, KeyIndex};

let chain_path = ChainPath::from("m/2147483649H/1".to_string())
    .iter()
    .collect::<Result<Vec<_>, _>>()
    .unwrap();
assert_eq!(chain_path, vec![
    SubPath::Root,
    SubPath::Child(KeyIndex::hardened_from_normalize_index(1).unwrap()),
    SubPath::Child(KeyIndex::Normal(1))
]);

Methods

impl ChainPath[src]

pub fn iter(&self) -> impl Iterator<Item = Result<SubPath, Error>> + '_[src]

An SubPath iterator over the ChainPath from Root to child keys.

pub fn into_string(self) -> String[src]

Trait Implementations

impl Debug for ChainPath[src]

impl Display for ChainPath[src]

impl Eq for ChainPath[src]

impl<'_> From<&'_ str> for ChainPath[src]

impl From<String> for ChainPath[src]

impl PartialEq<ChainPath> for ChainPath[src]

impl StructuralEq for ChainPath[src]

impl StructuralPartialEq for ChainPath[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>,