[][src]Struct derivation_path::DerivationPath

pub struct DerivationPath(_);

A list of ChildIndex items

Implementations

impl DerivationPath[src]

pub fn new<P>(path: P) -> Self where
    P: Into<Box<[ChildIndex]>>, 
[src]

Build a DerivationPath from a list of ChildIndex items

pub fn bip32<P>(path: P) -> Result<Self, DerivationPathError> where
    P: Into<Box<[ChildIndex]>>, 
[src]

Build a BIP32 style DerivationPath. This will fail if the length of the path is greater than 255 items

pub fn bip44(
    coin: u32,
    account: u32,
    change: u32,
    address: u32
) -> Result<Self, DerivationPathError>
[src]

Build a BIP44 style DerivationPath: m/44'/coin'/account'/change/address

pub fn bip49(
    coin: u32,
    account: u32,
    change: u32,
    address: u32
) -> Result<Self, DerivationPathError>
[src]

Build a BIP49 style DerivationPath: m/49'/coin'/account'/change/address

pub fn path(&self) -> &[ChildIndex][src]

Get a reference to the list of ChildIndex items

pub fn path_type(&self) -> DerivationPathType[src]

Get the DerivationPathType. This will check the "purpose" index in BIP44/49 style derivation paths or otherwise return BIP32 if the length is less than 255

Trait Implementations

impl AsRef<[ChildIndex]> for DerivationPath[src]

impl Clone for DerivationPath[src]

impl Debug for DerivationPath[src]

impl Display for DerivationPath[src]

impl Eq for DerivationPath[src]

impl FromStr for DerivationPath[src]

type Err = DerivationPathParseError

The associated error which can be returned from parsing.

impl<'a> IntoIterator for &'a DerivationPath[src]

type IntoIter = Iter<'a, ChildIndex>

Which kind of iterator are we turning this into?

type Item = &'a ChildIndex

The type of the elements being iterated over.

impl PartialEq<DerivationPath> for DerivationPath[src]

impl StructuralEq for DerivationPath[src]

impl StructuralPartialEq for DerivationPath[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> 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.