[][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]

Implementations

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 Clone for ExtKeychainPath[src]

impl Copy for ExtKeychainPath[src]

impl Debug for ExtKeychainPath[src]

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

impl Eq for ExtKeychainPath[src]

impl PartialEq<ExtKeychainPath> for ExtKeychainPath[src]

impl StructuralEq for ExtKeychainPath[src]

impl StructuralPartialEq for ExtKeychainPath[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> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<T> UnsafeAny for T where
    T: Any