[][src]Struct hkd32::Path

#[repr(transparent)]pub struct Path(_);

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

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

Implementations

impl Path[src]

pub fn new<P: ?Sized>(path: &P) -> Result<&Self, Error> where
    P: AsRef<[u8]>, 
[src]

Create a path from a byte slice.

Returns Error if the path is malformed.

pub fn as_bytes(&self) -> &[u8][src]

Obtain a reference to this path's bytestring serialization.

pub fn components(&self) -> Components<'_>

Notable traits for Components<'a>

impl<'a> Iterator for Components<'a> type Item = Component<'a>;
[src]

Obtain a component iterator for this path.

pub fn is_root(&self) -> bool[src]

Is this path the root path?

pub fn join<P>(&self, path: P) -> PathBuf where
    P: AsRef<Path>, 
[src]

Create a PathBuf with path joined to self.

Requires the alloc feature is enabled.

pub fn parent(&self) -> Option<&Path>[src]

Get the parent path for this path

pub fn stringify(&self) -> Result<String, Error>[src]

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.

pub fn to_vec(&self) -> Vec<u8>[src]

Serialize this Path as a byte vector

Trait Implementations

impl AsRef<Path> for Path[src]

impl AsRef<Path> for PathBuf[src]

impl Borrow<Path> for PathBuf[src]

impl Debug for Path[src]

impl Eq for Path[src]

impl Hash for Path[src]

impl Ord for Path[src]

impl PartialEq<Path> for Path[src]

impl PartialOrd<Path> for Path[src]

impl StructuralEq for Path[src]

impl StructuralPartialEq for Path[src]

impl ToOwned for Path[src]

type Owned = PathBuf

The resulting type after obtaining ownership.

Auto Trait Implementations

impl RefUnwindSafe for Path

impl Send for Path

impl Sync for Path

impl Unpin for Path

impl UnwindSafe for Path

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.