[][src]Trait hdpath::HDPath

pub trait HDPath {
    fn len(&self) -> u8;
fn get(&self, pos: u8) -> Option<PathValue>; fn to_bytes(&self) -> Vec<u8> { ... } }

General trait for an HDPath. Common implementations are StandardHDPath, AccountHDPath and CustomHDPath

Required methods

fn len(&self) -> u8

Size of the HD Path

fn get(&self, pos: u8) -> Option<PathValue>

Get element as the specified position. The implementation must return Some<PathValue> for all values up to len(). And return None if the position if out of bounds.

See PathValue

Loading content...

Provided methods

fn to_bytes(&self) -> Vec<u8>

Encode as bytes, where first byte is number of elements in path (always 5 for StandardHDPath) following by 4-byte BE values

Loading content...

Implementors

impl HDPath for AccountHDPath[src]

impl HDPath for CustomHDPath[src]

impl HDPath for StandardHDPath[src]

Loading content...