Struct webc::PathSegments
source · pub struct PathSegments(/* private fields */);Expand description
A series of PathSegments specifying the absolute path to something.
Implementations§
source§impl PathSegments
impl PathSegments
sourcepub const ROOT: PathSegments = _
pub const ROOT: PathSegments = _
The root path (i.e. /).
sourcepub fn push(&mut self, segment: PathSegment)
pub fn push(&mut self, segment: PathSegment)
Add a PathSegment to this path.
sourcepub fn pop(&mut self) -> Option<PathSegment>
pub fn pop(&mut self) -> Option<PathSegment>
Remove the last PathSegment from this path, if one was present.
sourcepub fn join(&self, segment: PathSegment) -> PathSegments
pub fn join(&self, segment: PathSegment) -> PathSegments
Get a new path by appending a PathSegment to the current path.
sourcepub fn iter(&self) -> impl Iterator<Item = &PathSegment> + '_
pub fn iter(&self) -> impl Iterator<Item = &PathSegment> + '_
Iterate over all the PathSegments in this path.
Trait Implementations§
source§impl Clone for PathSegments
impl Clone for PathSegments
source§fn clone(&self) -> PathSegments
fn clone(&self) -> PathSegments
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 Debug for PathSegments
impl Debug for PathSegments
source§impl Display for PathSegments
impl Display for PathSegments
source§impl FromIterator<PathSegment> for PathSegments
impl FromIterator<PathSegment> for PathSegments
source§fn from_iter<T: IntoIterator<Item = PathSegment>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = PathSegment>>(iter: T) -> Self
Creates a value from an iterator. Read more
source§impl FromStr for PathSegments
impl FromStr for PathSegments
source§impl Hash for PathSegments
impl Hash for PathSegments
source§impl<'a> IntoIterator for &'a PathSegments
impl<'a> IntoIterator for &'a PathSegments
source§impl IntoIterator for PathSegments
impl IntoIterator for PathSegments
source§impl Ord for PathSegments
impl Ord for PathSegments
source§fn cmp(&self, other: &PathSegments) -> Ordering
fn cmp(&self, other: &PathSegments) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for PathSegments
impl PartialEq for PathSegments
source§impl PartialOrd for PathSegments
impl PartialOrd for PathSegments
source§impl ToPathSegments for PathSegments
impl ToPathSegments for PathSegments
source§fn to_path_segments(&self) -> Result<PathSegments, PathSegmentError>
fn to_path_segments(&self) -> Result<PathSegments, PathSegmentError>
Convert to
PathSegments.impl Eq for PathSegments
impl StructuralPartialEq for PathSegments
Auto Trait Implementations§
impl Freeze for PathSegments
impl RefUnwindSafe for PathSegments
impl Send for PathSegments
impl Sync for PathSegments
impl Unpin for PathSegments
impl UnwindSafe for PathSegments
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.