pub struct DavPath { /* private fields */ }Expand description
A normalized path relative to a WebDAV mount.
Implementations§
Source§impl DavPath
impl DavPath
Sourcepub fn new(path: &str) -> Result<Self, DavPathError>
pub fn new(path: &str) -> Result<Self, DavPathError>
Percent-decodes and canonicalizes a path without allowing root escape.
§Errors
Returns DavPathError when the mount path is invalid or the URI escapes that mount.
Sourcepub fn is_collection(&self) -> bool
pub fn is_collection(&self) -> bool
Returns whether the path denotes a collection alias.
Sourcepub fn parent(&self) -> Option<Self>
pub fn parent(&self) -> Option<Self>
Returns the canonical parent collection without reparsing decoded path data.
Returns None when this path is the WebDAV mount root.
Sourcepub fn join_child(
&self,
decoded_name: &[u8],
is_collection: bool,
) -> Result<Self, DavPathError>
pub fn join_child( &self, decoded_name: &[u8], is_collection: bool, ) -> Result<Self, DavPathError>
Joins one decoded backend child name without treating literal percent bytes as URI input.
§Errors
Returns DavPathError when the decoded child name is not UTF-8, is empty, is a dot
segment, or contains a path separator.
Trait Implementations§
impl Eq for DavPath
impl StructuralPartialEq for DavPath
Auto Trait Implementations§
impl Freeze for DavPath
impl RefUnwindSafe for DavPath
impl Send for DavPath
impl Sync for DavPath
impl Unpin for DavPath
impl UnwindSafe for DavPath
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.