Enum rustful::context::UriPath
[−]
[src]
pub enum UriPath { Path(MaybeUtf8Owned), Asterisk, }
A URI Path that can be a path or an asterisk (*
).
The URI Path may be an invalid UTF-8 path and it is therefore represented as a percent decoded byte vector, but can easily be parsed as a string.
Variants
Path(MaybeUtf8Owned)
A path URI.
Asterisk
An asterisk (*
) URI.
Methods
impl UriPath
[src]
impl UriPath
pub fn as_path(&self) -> Option<MaybeUtf8Slice>
[src]
pub fn as_path(&self) -> Option<MaybeUtf8Slice>
Borrow the URI as a raw path.
pub fn as_utf8_path(&self) -> Option<&str>
[src]
pub fn as_utf8_path(&self) -> Option<&str>
Borrow the URI as a UTF-8 path, if valid.
pub fn as_utf8_path_lossy(&self) -> Option<Cow<str>>
[src]
pub fn as_utf8_path_lossy(&self) -> Option<Cow<str>>
Borrow the URI as a UTF-8 path, if valid, or convert it to a valid UTF-8 string.
pub fn is_path(&self) -> bool
[src]
pub fn is_path(&self) -> bool
Check if the URI is a path.
pub fn is_asterisk(&self) -> bool
[src]
pub fn is_asterisk(&self) -> bool
Check if the URI is an asterisk (*
).
Trait Implementations
impl Clone for UriPath
[src]
impl Clone for UriPath
fn clone(&self) -> UriPath
[src]
fn clone(&self) -> UriPath
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for UriPath
[src]
impl Debug for UriPath
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for UriPath
[src]
impl PartialEq for UriPath
fn eq(&self, __arg_0: &UriPath) -> bool
[src]
fn eq(&self, __arg_0: &UriPath) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &UriPath) -> bool
[src]
fn ne(&self, __arg_0: &UriPath) -> bool
This method tests for !=
.
impl Eq for UriPath
[src]
impl Eq for UriPath
impl Display for UriPath
[src]
impl Display for UriPath