pub struct EntryPath { /* private fields */ }
Implementations§
source§impl EntryPath
impl EntryPath
sourcepub fn calc_crc<T: AsRef<str>>(parts: &[T]) -> Option<u16>
pub fn calc_crc<T: AsRef<str>>(parts: &[T]) -> Option<u16>
Calculate crc given parts of path
Crc is XOR of crc of individual parts
Returns None
if given slice is empty
sourcepub fn from<P1: AsRef<Path>, P2: AsRef<Path>>(
root: P1,
path: P2
) -> Option<Self>
pub fn from<P1: AsRef<Path>, P2: AsRef<Path>>( root: P1, path: P2 ) -> Option<Self>
Create new entry path from Path
and root
Returns None
if path doesn’t start from root or if it contains non unicode characters
and can’t be represented as String
pub fn parts(&self) -> &[String]
Trait Implementations§
source§impl PartialEq<EntryPath> for EntryPath
impl PartialEq<EntryPath> for EntryPath
source§impl PartialOrd<EntryPath> for EntryPath
impl PartialOrd<EntryPath> for EntryPath
path1 < path2 if path2 contains path1. Example: /data < /data/test /mnt/file > /mnt /mnt == /mnt
For different paths result is None Example: partial_cmp(/mnt/data, /mnt/test) == None
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more