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 duplicate 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> Display for RedoxReference<'a>
impl<'a> Display 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>
impl<'a> Eq for RedoxReference<'a>
impl<'a> StructuralPartialEq for RedoxReference<'a>
Auto Trait Implementations§
impl<'a> Freeze for RedoxReference<'a>
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