derive

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§