Struct webc::PathSegments
source · pub struct PathSegments(_);
Expand description
A series of PathSegment
s 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 PathSegment
s 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
§type Item = PathSegment
type Item = PathSegment
The type of the elements being iterated over.
§type IntoIter = <Vec<PathSegment, Global> as IntoIterator>::IntoIter
type IntoIter = <Vec<PathSegment, Global> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
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<PathSegments> for PathSegments
impl PartialEq<PathSegments> for PathSegments
source§fn eq(&self, other: &PathSegments) -> bool
fn eq(&self, other: &PathSegments) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PathSegments> for PathSegments
impl PartialOrd<PathSegments> for PathSegments
source§fn partial_cmp(&self, other: &PathSegments) -> Option<Ordering>
fn partial_cmp(&self, other: &PathSegments) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§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 StructuralEq for PathSegments
impl StructuralPartialEq for PathSegments
Auto Trait Implementations§
impl RefUnwindSafe for PathSegments
impl Send for PathSegments
impl Sync for PathSegments
impl Unpin for PathSegments
impl UnwindSafe for PathSegments
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.