#[repr(transparent)]
pub struct PathBuf(_);
Expand description

Key derivation paths: location within a key hierarchy which names/identifies a specific key.

This is the owned path type. The corresponding reference type is hkd32::Path (ala the corresponding types in std).

Implementations

Parse a path from its bytestring serialization.

Create a new PathBuf representing the root derivation path.

This is also the default value for PathBuf.

Borrow this PathBuf as a Path

Extend this key derivation path with additional components.

Push an additional component onto this path.

Methods from Deref<Target = Path>

Obtain a reference to this path’s bytestring serialization.

Obtain a component iterator for this path.

Is this path the root path?

Create a PathBuf with path joined to self.

Requires the alloc feature is enabled.

Get the parent path for this path

Attempt to convert this path to an /x/y/z string.

This will only succeed if the path components are all ASCII.

Requires the alloc feature is enabled.

Serialize this Path as a byte vector

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Immutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Executes the destructor for this type. Read more

Parse a derivation path from a string.

Derivation path strings look like Unix paths (e.g. “/foo/bar/baz”). They are delimited by a slash character (/ a.k.a. hkd32::DELIMITER) and must start with a leading slash.

Empty path components are not allowed (e.g. //, /foo//)

The associated error which can be returned from parsing.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.