Struct kaspa_bip32::DerivationPath
source · pub struct DerivationPath { /* private fields */ }
Expand description
Derivation paths within a hierarchical keyspace.
Implementations§
source§impl DerivationPath
impl DerivationPath
sourcepub fn iter(&self) -> impl Iterator<Item = ChildNumber> + '_
pub fn iter(&self) -> impl Iterator<Item = ChildNumber> + '_
Iterate over the ChildNumber
values in this derivation path.
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Get the count of ChildNumber
values in this derivation path.
sourcepub fn parent(&self) -> Option<Self>
pub fn parent(&self) -> Option<Self>
Get the parent DerivationPath
for the current one.
Returns None
if this is already the root path.
sourcepub fn push(&mut self, child_number: ChildNumber)
pub fn push(&mut self, child_number: ChildNumber)
Push a ChildNumber
onto an existing derivation path.
Trait Implementations§
source§impl AsRef<[ChildNumber]> for DerivationPath
impl AsRef<[ChildNumber]> for DerivationPath
source§fn as_ref(&self) -> &[ChildNumber]
fn as_ref(&self) -> &[ChildNumber]
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for DerivationPath
impl Clone for DerivationPath
source§fn clone(&self) -> DerivationPath
fn clone(&self) -> DerivationPath
Returns a copy of the value. Read more
1.0.0 · 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 DerivationPath
impl Debug for DerivationPath
source§impl Default for DerivationPath
impl Default for DerivationPath
source§fn default() -> DerivationPath
fn default() -> DerivationPath
Returns the “default value” for a type. Read more
source§impl Display for DerivationPath
impl Display for DerivationPath
source§impl Extend<ChildNumber> for DerivationPath
impl Extend<ChildNumber> for DerivationPath
source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ChildNumber>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = ChildNumber>,
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl From<DerivationPath> for DerivationPath
impl From<DerivationPath> for DerivationPath
source§fn from(value: DerivationPath) -> Self
fn from(value: DerivationPath) -> Self
Converts to this type from the input type.
source§impl FromStr for DerivationPath
impl FromStr for DerivationPath
source§impl IntoIterator for DerivationPath
impl IntoIterator for DerivationPath
§type Item = ChildNumber
type Item = ChildNumber
The type of the elements being iterated over.
§type IntoIter = IntoIter<ChildNumber>
type IntoIter = IntoIter<ChildNumber>
Which kind of iterator are we turning this into?
source§impl PartialEq for DerivationPath
impl PartialEq for DerivationPath
source§fn eq(&self, other: &DerivationPath) -> bool
fn eq(&self, other: &DerivationPath) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DerivationPath
impl StructuralEq for DerivationPath
impl StructuralPartialEq for DerivationPath
Auto Trait Implementations§
impl RefUnwindSafe for DerivationPath
impl Send for DerivationPath
impl Sync for DerivationPath
impl Unpin for DerivationPath
impl UnwindSafe for DerivationPath
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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