[][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).

Methods

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.

Important traits for Components<'a>
pub fn components(&self) -> Components[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 Debug for Path[src]

impl PartialEq<Path> for Path[src]

impl Eq for Path[src]

impl Ord for Path[src]

impl PartialOrd<Path> for Path[src]

impl Hash for Path[src]

impl AsRef<Path> for Path[src]

impl AsRef<Path> for PathBuf[src]

impl Borrow<Path> for PathBuf[src]

impl ToOwned for Path[src]

type Owned = PathBuf

The resulting type after obtaining ownership.

Auto Trait Implementations

impl Unpin for Path

impl Send for Path

impl Sync for Path

impl UnwindSafe for Path

impl RefUnwindSafe for Path

Blanket Implementations

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.