[−][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
).
Methods
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.
ⓘImportant traits for Components<'a>pub fn components(&self) -> Components
[src]
ⓘImportant traits for Components<'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 Debug for Path
[src]
impl PartialEq<Path> for Path
[src]
impl Eq for Path
[src]
impl Ord for Path
[src]
fn cmp(&self, other: &Path) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialOrd<Path> for Path
[src]
fn partial_cmp(&self, other: &Path) -> Option<Ordering>
[src]
fn lt(&self, other: &Path) -> bool
[src]
fn le(&self, other: &Path) -> bool
[src]
fn gt(&self, other: &Path) -> bool
[src]
fn ge(&self, other: &Path) -> bool
[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,