pub struct Path { /* private fields */ }
Expand description
Path struct
Implementations§
source§impl Path
impl Path
sourcepub fn new(path_str: &str) -> Self
pub fn new(path_str: &str) -> Self
New a Path from a path string
use cnfs::Path;
let p1 = Path::new("/home//caozhanhao/cnss");
let p2 = Path::new("/home/caozhanhao/cnss/dev/../");
assert_eq!(p1, p2);
sourcepub fn starts_with(&self, item: &Self) -> bool
pub fn starts_with(&self, item: &Self) -> bool
Check if the path is starts with given path
Trait Implementations§
source§impl Ord for Path
impl Ord for Path
source§impl PartialEq for Path
impl PartialEq for Path
source§impl PartialOrd for Path
impl PartialOrd for Path
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 moreimpl Eq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more