[−][src]Struct hkd32::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]
P: AsRef<[u8]>,
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]
Notable traits for Components<'a>
impl<'a> Iterator for Components<'a> type Item = Component<'a>;
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]
P: AsRef<Path>,
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,