[−][src]Struct webdav_handler::webpath::WebPath
Path information relative to a prefix.
Methods
impl WebPath[src]
pub fn from_str(src: &str, prefix: &str) -> Result<WebPath, ParseError>[src]
from URL encoded strings: path and prefix.
pub fn from_uri(uri: &Uri, prefix: &str) -> Result<Self, ParseError>[src]
from request.uri
pub fn from_url(url: &Url, prefix: &str) -> Result<Self, ParseError>[src]
from url::Url and (not-url-encoded) prefix string.
pub fn as_url_string_with_prefix(&self) -> String[src]
as URL encoded string, with prefix.
pub fn as_utf8_string_with_prefix(&self) -> String[src]
as utf8 string, with prefix. uses String::from_utf8_lossy.
pub fn as_bytes(&self) -> &[u8][src]
as raw bytes, not encoded, no prefix.
pub fn as_pathbuf(&self) -> PathBuf[src]
as OS specific Path. never ends in "/".
pub fn as_pathbuf_with_prefix<P: AsRef<Path>>(&self, path: P) -> PathBuf[src]
prefix the WebPath with a Path and return a PathBuf
pub fn as_rel_pathbuf(&self) -> PathBuf[src]
as OS specific Path, relative (remove first slash)
pub fn is_collection(&self) -> bool[src]
is this a collection i.e. does the original URL path end in "/".
pub fn prefix(&self) -> &str[src]
return the URL prefix.
pub fn add_slash(&mut self)[src]
add a slash to the end of the path (if not already present).
pub fn file_name(&self) -> &[u8][src]
The filename is the last segment of the path. Can be empty.
pub fn num_segments(&self) -> usize[src]
Count the number of segments the path has. "/" has 0.
pub fn push_segment(&mut self, b: &[u8])[src]
Add a segment to the end of the path.
Trait Implementations
impl PartialEq<WebPath> for WebPath[src]
Comparision ignores any trailing slash, so /foo == /foo/
fn eq(&self, rhs: &WebPath) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Clone for WebPath[src]
fn clone(&self) -> WebPath[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for WebPath[src]
impl Display for WebPath[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self