pub struct AbsoluteDerivationPath(/* private fields */);Expand description
An absolute BIP-0032 derivation path, starting at the master key.
Conversion to RelativeDerivationPath is available through
AbsoluteDerivationPath::as_relative or
AbsoluteDerivationPath::into_relative.
The leading m in BIP-0032 notation has historically been subtle in this crate:
See PR #2451 and PR #2677 for prior discussion on the “m/” notation.
Implementations§
Source§impl AbsoluteDerivationPath
impl AbsoluteDerivationPath
Sourcepub fn as_relative(&self) -> &RelativeDerivationPath
pub fn as_relative(&self) -> &RelativeDerivationPath
Returns the relative path below the master key.
Sourcepub fn into_relative(self) -> RelativeDerivationPath
pub fn into_relative(self) -> RelativeDerivationPath
Converts this absolute path into the relative path below the master key.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns length of the relative derivation path below the master key.
Sourcepub fn contains_hardened_child(&self) -> bool
pub fn contains_hardened_child(&self) -> bool
Returns true if the relative path below the master key contains a hardened child number.
Sourcepub fn join<T: AsRef<[ChildNumber]>>(&self, path: T) -> Self
pub fn join<T: AsRef<[ChildNumber]>>(&self, path: T) -> Self
Joins self with path and returns the resulting new path.
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for AbsoluteDerivationPath
Available on crate feature arbitrary only.
impl<'a> Arbitrary<'a> for AbsoluteDerivationPath
Available on crate feature
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for AbsoluteDerivationPath
impl Clone for AbsoluteDerivationPath
Source§fn clone(&self) -> AbsoluteDerivationPath
fn clone(&self) -> AbsoluteDerivationPath
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AbsoluteDerivationPath
impl Debug for AbsoluteDerivationPath
Source§impl Default for AbsoluteDerivationPath
impl Default for AbsoluteDerivationPath
Source§impl<'de> Deserialize<'de> for AbsoluteDerivationPath
impl<'de> Deserialize<'de> for AbsoluteDerivationPath
Source§fn deserialize<D>(deserializer: D) -> Result<AbsoluteDerivationPath, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<AbsoluteDerivationPath, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for AbsoluteDerivationPath
impl Display for AbsoluteDerivationPath
impl Eq for AbsoluteDerivationPath
Source§impl From<AbsoluteDerivationPath> for RelativeDerivationPath
impl From<AbsoluteDerivationPath> for RelativeDerivationPath
Source§fn from(path: AbsoluteDerivationPath) -> Self
fn from(path: AbsoluteDerivationPath) -> Self
Converts to this type from the input type.
Source§impl From<RelativeDerivationPath> for AbsoluteDerivationPath
impl From<RelativeDerivationPath> for AbsoluteDerivationPath
Source§fn from(path: RelativeDerivationPath) -> Self
fn from(path: RelativeDerivationPath) -> Self
Converts to this type from the input type.
Source§impl FromStr for AbsoluteDerivationPath
impl FromStr for AbsoluteDerivationPath
Source§impl Hash for AbsoluteDerivationPath
impl Hash for AbsoluteDerivationPath
Source§impl Ord for AbsoluteDerivationPath
impl Ord for AbsoluteDerivationPath
Source§fn cmp(&self, other: &AbsoluteDerivationPath) -> Ordering
fn cmp(&self, other: &AbsoluteDerivationPath) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AbsoluteDerivationPath
impl PartialEq for AbsoluteDerivationPath
Source§fn eq(&self, other: &AbsoluteDerivationPath) -> bool
fn eq(&self, other: &AbsoluteDerivationPath) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AbsoluteDerivationPath
impl PartialOrd for AbsoluteDerivationPath
Source§impl Serialize for AbsoluteDerivationPath
impl Serialize for AbsoluteDerivationPath
impl StructuralPartialEq for AbsoluteDerivationPath
Auto Trait Implementations§
impl Freeze for AbsoluteDerivationPath
impl RefUnwindSafe for AbsoluteDerivationPath
impl Send for AbsoluteDerivationPath
impl Sync for AbsoluteDerivationPath
impl Unpin for AbsoluteDerivationPath
impl UnsafeUnpin for AbsoluteDerivationPath
impl UnwindSafe for AbsoluteDerivationPath
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more