[][src]Struct hdpath::StandardHDPath

pub struct StandardHDPath { /* fields omitted */ }

Standard HD Path for BIP-44, BIP-49, BIP-84 and similar. For path as m/purpose'/coin_type'/account'/change/address_index, like m/44'/0'/0'/0/0.

Create new

use hdpath::{StandardHDPath, Purpose};

//creates path m/84'/0'/0'/0/0
let hdpath = StandardHDPath::new(Purpose::Witness, 0, 0, 0, 0);

Parse string

use hdpath::{StandardHDPath, Purpose};

//creates path m/84'/0'/0'/0/0
let hdpath = StandardHDPath::try_from("m/84'/0'/0'/0/0");

Methods

impl StandardHDPath[src]

pub fn new(
    purpose: Purpose,
    coin_type: u32,
    account: u32,
    change: u32,
    index: u32
) -> StandardHDPath
[src]

pub fn purpose(&self) -> &Purpose[src]

pub fn coin_type(&self) -> u32[src]

pub fn account(&self) -> u32[src]

pub fn change(&self) -> u32[src]

pub fn index(&self) -> u32[src]

Trait Implementations

impl Clone for StandardHDPath[src]

impl Debug for StandardHDPath[src]

impl Default for StandardHDPath[src]

impl Eq for StandardHDPath[src]

impl From<StandardHDPath> for CustomHDPath[src]

impl Ord for StandardHDPath[src]

impl PartialEq<StandardHDPath> for StandardHDPath[src]

impl PartialOrd<StandardHDPath> for StandardHDPath[src]

impl StructuralEq for StandardHDPath[src]

impl StructuralPartialEq for StandardHDPath[src]

impl ToString for StandardHDPath[src]

impl<'_> TryFrom<&'_ str> for StandardHDPath[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<CustomHDPath> for StandardHDPath[src]

type Error = Error

The type returned in the event of a conversion error.

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.