[][src]Struct grin_keychain::ExtKeychainPath

pub struct ExtKeychainPath {
    pub depth: u8,
    pub path: [ChildNumber; 4],
}

Encapsulates a max 4-level deep BIP32 path, which is the most we can currently fit into a rangeproof message. The depth encodes how far the derivation depths go and allows differentiating paths. As m/0, m/0/0 or m/0/0/0/0 result in different derivations, a path needs to encode its maximum depth.

Fields

depth: u8path: [ChildNumber; 4]

Methods

impl ExtKeychainPath[src]

pub fn new(depth: u8, d0: u32, d1: u32, d2: u32, d3: u32) -> ExtKeychainPath[src]

Return a new chain path with given derivation and depth

pub fn from_identifier(id: &Identifier) -> ExtKeychainPath[src]

from an Indentifier [manual deserialization]

pub fn to_identifier(&self) -> Identifier[src]

to an Identifier [manual serialization]

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

Last part of the path (for last n_child)

Trait Implementations

impl Copy for ExtKeychainPath[src]

impl PartialEq<ExtKeychainPath> for ExtKeychainPath[src]

impl Clone for ExtKeychainPath[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for ExtKeychainPath[src]

impl Debug for ExtKeychainPath[src]

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

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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> 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 for T

type Output = T

Should always be Self