pub struct PathSegment(/* private fields */);Expand description
Represents a single segment of a path.
This struct provides a way to represent and manipulate individual components of a path, ensuring they are valid path segments.
Implementations§
Source§impl PathSegment
impl PathSegment
Trait Implementations§
Source§impl AsRef<[u8]> for PathSegment
impl AsRef<[u8]> for PathSegment
Source§impl AsRef<OsStr> for PathSegment
impl AsRef<OsStr> for PathSegment
Source§impl AsRef<Path> for PathSegment
impl AsRef<Path> for PathSegment
Source§impl Clone for PathSegment
impl Clone for PathSegment
Source§fn clone(&self) -> PathSegment
fn clone(&self) -> PathSegment
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 PathSegment
impl Debug for PathSegment
Source§impl Display for PathSegment
impl Display for PathSegment
Source§impl<'a> From<&'a PathSegment> for Component<'a>
impl<'a> From<&'a PathSegment> for Component<'a>
Source§fn from(segment: &'a PathSegment) -> Self
fn from(segment: &'a PathSegment) -> Self
Converts to this type from the input type.
Source§impl From<PathSegment> for PathBuf
impl From<PathSegment> for PathBuf
Source§fn from(segment: PathSegment) -> Self
fn from(segment: PathSegment) -> Self
Converts to this type from the input type.
Source§impl FromStr for PathSegment
impl FromStr for PathSegment
Source§impl Hash for PathSegment
impl Hash for PathSegment
Source§impl Ord for PathSegment
impl Ord for PathSegment
Source§fn cmp(&self, other: &PathSegment) -> Ordering
fn cmp(&self, other: &PathSegment) -> 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 PathSegment
impl PartialEq for PathSegment
Source§impl PartialOrd for PathSegment
impl PartialOrd for PathSegment
Source§impl<'a> TryFrom<&Component<'a>> for PathSegment
impl<'a> TryFrom<&Component<'a>> for PathSegment
Source§impl TryFrom<&str> for PathSegment
impl TryFrom<&str> for PathSegment
Source§impl<'a> TryFrom<Component<'a>> for PathSegment
impl<'a> TryFrom<Component<'a>> for PathSegment
impl Eq for PathSegment
impl StructuralPartialEq for PathSegment
Auto Trait Implementations§
impl Freeze for PathSegment
impl RefUnwindSafe for PathSegment
impl Send for PathSegment
impl Sync for PathSegment
impl Unpin for PathSegment
impl UnwindSafe for PathSegment
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§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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)