Trait derive::IdxBase

source ·
pub trait IdxBase: Sized + Eq + Ord + Copy {
    // Required methods
    fn is_hardened(&self) -> bool;
    fn child_number(&self) -> u32;
    fn index(&self) -> u32;
}
Expand description

Trait defining basic index functionality without mathematics operations.

Required Methods§

source

fn is_hardened(&self) -> bool

Detects whether path segment uses hardened index(es)

source

fn child_number(&self) -> u32

Returns child number corresponding to this index.

Child number is always a value in range of 0..HARDENED_INDEX_BOUNDARY

source

fn index(&self) -> u32

Returns value used during derivation, which for normal indexes must lie in range 0..HARDENED_INDEX_BOUNDARY and for hardened in range of HARDENED_INDEX_BOUNDARY..=u32::MAX

Object Safety§

This trait is not object safe.

Implementors§