[][src]Struct hdpath::CustomHDPath

pub struct CustomHDPath(pub Vec<PathValue>);

A custom HD Path, that can be any length and contain any Hardened and non-Hardened values in any order. Direct implementation for BIP-32

Usage

Parse string

use hdpath::CustomHDPath;

let hdpath = CustomHDPath::try_from("m/1'/2'/3/4/5'/6'/7").unwrap();
let hdpath = CustomHDPath::try_from("m/44'/0'/1'/0/0").unwrap();
//also support uppercase notation
let hdpath = CustomHDPath::try_from("M/44H/0H/1H/0/0").unwrap();

Direct create

use hdpath::{CustomHDPath, PathValue};

let hdpath = CustomHDPath::new(vec![
   PathValue::hardened(44), PathValue::hardened(0), PathValue::hardened(1),
   PathValue::normal(0), PathValue::normal(0)
]);

Methods

impl CustomHDPath[src]

pub fn new(values: Vec<PathValue>) -> CustomHDPath[src]

Trait Implementations

impl Clone for CustomHDPath[src]

impl Debug for CustomHDPath[src]

impl Eq for CustomHDPath[src]

impl From<StandardHDPath> for CustomHDPath[src]

impl PartialEq<CustomHDPath> for CustomHDPath[src]

impl StructuralEq for CustomHDPath[src]

impl StructuralPartialEq for CustomHDPath[src]

impl<'_> TryFrom<&'_ str> for CustomHDPath[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, 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.