Struct redox_path::RedoxReference
source · pub struct RedoxReference<'a>(/* private fields */);Expand description
The part of a path that is sent to each scheme
Implementations§
source§impl<'a> RedoxReference<'a>
impl<'a> RedoxReference<'a>
sourcepub fn new<S: Into<Cow<'a, str>>>(reference: S) -> Option<Self>
pub fn new<S: Into<Cow<'a, str>>>(reference: S) -> Option<Self>
Create a new RedoxReference, ensuring there are no invalid characters
sourcepub fn join<S: Into<Cow<'a, str>>>(&self, path: S) -> Option<Self>
pub fn join<S: Into<Cow<'a, str>>>(&self, path: S) -> Option<Self>
Join a RedoxReference with a path. Relative paths will be joined, absolute paths will
be returned as-is.
Returns Some on success and None if the path is not valid
sourcepub fn canonical(&self) -> Option<Self>
pub fn canonical(&self) -> Option<Self>
Canonicalize RedoxReference, removing . and ..
Returns Some on success and None if the path is not valid
Trait Implementations§
source§impl<'a> AsRef<str> for RedoxReference<'a>
impl<'a> AsRef<str> for RedoxReference<'a>
source§impl<'a> Clone for RedoxReference<'a>
impl<'a> Clone for RedoxReference<'a>
source§fn clone(&self) -> RedoxReference<'a>
fn clone(&self) -> RedoxReference<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'a> Debug for RedoxReference<'a>
impl<'a> Debug for RedoxReference<'a>
source§impl<'a> Hash for RedoxReference<'a>
impl<'a> Hash for RedoxReference<'a>
source§impl<'a> PartialEq for RedoxReference<'a>
impl<'a> PartialEq for RedoxReference<'a>
source§fn eq(&self, other: &RedoxReference<'a>) -> bool
fn eq(&self, other: &RedoxReference<'a>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<'a> Eq for RedoxReference<'a>
impl<'a> StructuralPartialEq for RedoxReference<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for RedoxReference<'a>
impl<'a> Send for RedoxReference<'a>
impl<'a> Sync for RedoxReference<'a>
impl<'a> Unpin for RedoxReference<'a>
impl<'a> UnwindSafe for RedoxReference<'a>
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