pub struct FilePathSegment<'a>(/* private fields */);Expand description
A FilePath segment.
Implementations§
Source§impl<'a> FilePathSegment<'a>
impl<'a> FilePathSegment<'a>
Sourcepub unsafe fn new_unchecked<T: Into<Cow<'a, str>>>(value: T) -> Self
pub unsafe fn new_unchecked<T: Into<Cow<'a, str>>>(value: T) -> Self
Sourcepub fn lossy_decode(self) -> Cow<'a, str>
pub fn lossy_decode(self) -> Cow<'a, str>
Sourcepub fn is_drive_letter(&self) -> bool
pub fn is_drive_letter(&self) -> bool
Sourcepub fn is_normalized_drive_letter(&self) -> bool
pub fn is_normalized_drive_letter(&self) -> bool
Sourcepub fn is_non_normalized_drive_letter(&self) -> bool
pub fn is_non_normalized_drive_letter(&self) -> bool
Sourcepub fn is_single_dot(&self) -> bool
pub fn is_single_dot(&self) -> bool
Sourcepub fn is_double_dot(&self) -> bool
pub fn is_double_dot(&self) -> bool
Sourcepub fn into_inner(self) -> Cow<'a, str>
pub fn into_inner(self) -> Cow<'a, str>
Turn into the inner Cow.
Sourcepub fn into_owned(self) -> FilePathSegment<'static>
pub fn into_owned(self) -> FilePathSegment<'static>
Turn into an owned Self.
Sourcepub fn borrowed(&self) -> FilePathSegment<'_>
pub fn borrowed(&self) -> FilePathSegment<'_>
Make a borrowing Self.
Source§impl<'a> FilePathSegment<'a>
impl<'a> FilePathSegment<'a>
Trait Implementations§
Source§impl AsRef<str> for FilePathSegment<'_>
impl AsRef<str> for FilePathSegment<'_>
Source§impl Borrow<str> for FilePathSegment<'_>
impl Borrow<str> for FilePathSegment<'_>
Source§impl<'a> Clone for FilePathSegment<'a>
impl<'a> Clone for FilePathSegment<'a>
Source§impl<'a> Debug for FilePathSegment<'a>
impl<'a> Debug for FilePathSegment<'a>
Source§impl Display for FilePathSegment<'_>
impl Display for FilePathSegment<'_>
impl Eq for FilePathSegment<'_>
Source§impl<'a, 'b> Extend<FilePathSegment<'b>> for FilePathSegments<'a>
impl<'a, 'b> Extend<FilePathSegment<'b>> for FilePathSegments<'a>
Source§fn extend<I: IntoIterator<Item = FilePathSegment<'b>>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = FilePathSegment<'b>>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<'a> From<&'a FilePathSegment<'_>> for PathSegments<'a>
impl<'a> From<&'a FilePathSegment<'_>> for PathSegments<'a>
Source§fn from(value: &'a FilePathSegment<'_>) -> Self
fn from(value: &'a FilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a FilePathSegment<'_>> for FilePathSegments<'a>
impl<'a> From<&'a FilePathSegment<'_>> for FilePathSegments<'a>
Source§fn from(value: &'a FilePathSegment<'_>) -> Self
fn from(value: &'a FilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a FilePathSegment<'_>> for SpecialNotFilePathSegments<'a>
impl<'a> From<&'a FilePathSegment<'_>> for SpecialNotFilePathSegments<'a>
Source§fn from(value: &'a FilePathSegment<'_>) -> Self
fn from(value: &'a FilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a FilePathSegment<'_>> for NonSpecialPathSegments<'a>
impl<'a> From<&'a FilePathSegment<'_>> for NonSpecialPathSegments<'a>
Source§fn from(value: &'a FilePathSegment<'_>) -> Self
fn from(value: &'a FilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a FilePathSegment<'_>> for PathSegment<'a>
impl<'a> From<&'a FilePathSegment<'_>> for PathSegment<'a>
Source§fn from(value: &'a FilePathSegment<'_>) -> Self
fn from(value: &'a FilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a FilePathSegment<'_>> for FilePathSegment<'a>
impl<'a> From<&'a FilePathSegment<'_>> for FilePathSegment<'a>
Source§fn from(value: &'a FilePathSegment<'_>) -> Self
fn from(value: &'a FilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a FilePathSegment<'_>> for SpecialNotFilePathSegment<'a>
impl<'a> From<&'a FilePathSegment<'_>> for SpecialNotFilePathSegment<'a>
Source§fn from(value: &'a FilePathSegment<'_>) -> Self
fn from(value: &'a FilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a FilePathSegment<'_>> for NonSpecialPathSegment<'a>
impl<'a> From<&'a FilePathSegment<'_>> for NonSpecialPathSegment<'a>
Source§fn from(value: &'a FilePathSegment<'_>) -> Self
fn from(value: &'a FilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a NonSpecialPathSegment<'_>> for FilePathSegment<'a>
impl<'a> From<&'a NonSpecialPathSegment<'_>> for FilePathSegment<'a>
Source§fn from(value: &'a NonSpecialPathSegment<'_>) -> Self
fn from(value: &'a NonSpecialPathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a PathSegment<'_>> for FilePathSegment<'a>
impl<'a> From<&'a PathSegment<'_>> for FilePathSegment<'a>
Source§fn from(value: &'a PathSegment<'_>) -> Self
fn from(value: &'a PathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a SpecialNotFilePathSegment<'_>> for FilePathSegment<'a>
impl<'a> From<&'a SpecialNotFilePathSegment<'_>> for FilePathSegment<'a>
Source§fn from(value: &'a SpecialNotFilePathSegment<'_>) -> Self
fn from(value: &'a SpecialNotFilePathSegment<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a String> for FilePathSegment<'a>
impl<'a> From<&'a String> for FilePathSegment<'a>
Source§impl<'a> From<&'a [u8]> for FilePathSegment<'a>
impl<'a> From<&'a [u8]> for FilePathSegment<'a>
Source§impl<'a> From<&'a str> for FilePathSegment<'a>
impl<'a> From<&'a str> for FilePathSegment<'a>
Source§impl<'a> From<FilePathSegment<'a>> for PathSegment<'a>
impl<'a> From<FilePathSegment<'a>> for PathSegment<'a>
Source§fn from(value: FilePathSegment<'a>) -> Self
fn from(value: FilePathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<FilePathSegment<'a>> for SpecialNotFilePathSegment<'a>
impl<'a> From<FilePathSegment<'a>> for SpecialNotFilePathSegment<'a>
Source§fn from(value: FilePathSegment<'a>) -> Self
fn from(value: FilePathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<FilePathSegment<'a>> for NonSpecialPathSegment<'a>
impl<'a> From<FilePathSegment<'a>> for NonSpecialPathSegment<'a>
Source§fn from(value: FilePathSegment<'a>) -> Self
fn from(value: FilePathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<FilePathSegment<'a>> for PathSegments<'a>
impl<'a> From<FilePathSegment<'a>> for PathSegments<'a>
Source§fn from(value: FilePathSegment<'a>) -> Self
fn from(value: FilePathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<FilePathSegment<'a>> for SpecialNotFilePathSegments<'a>
impl<'a> From<FilePathSegment<'a>> for SpecialNotFilePathSegments<'a>
Source§fn from(value: FilePathSegment<'a>) -> Self
fn from(value: FilePathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<FilePathSegment<'a>> for FilePathSegments<'a>
impl<'a> From<FilePathSegment<'a>> for FilePathSegments<'a>
Source§fn from(value: FilePathSegment<'a>) -> Self
fn from(value: FilePathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<FilePathSegment<'a>> for NonSpecialPathSegments<'a>
impl<'a> From<FilePathSegment<'a>> for NonSpecialPathSegments<'a>
Source§fn from(value: FilePathSegment<'a>) -> Self
fn from(value: FilePathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<NonSpecialPathSegment<'a>> for FilePathSegment<'a>
impl<'a> From<NonSpecialPathSegment<'a>> for FilePathSegment<'a>
Source§fn from(value: NonSpecialPathSegment<'a>) -> Self
fn from(value: NonSpecialPathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<PathSegment<'a>> for FilePathSegment<'a>
impl<'a> From<PathSegment<'a>> for FilePathSegment<'a>
Source§fn from(value: PathSegment<'a>) -> Self
fn from(value: PathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SpecialNotFilePathSegment<'a>> for FilePathSegment<'a>
impl<'a> From<SpecialNotFilePathSegment<'a>> for FilePathSegment<'a>
Source§fn from(value: SpecialNotFilePathSegment<'a>) -> Self
fn from(value: SpecialNotFilePathSegment<'a>) -> Self
Converts to this type from the input type.
Source§impl From<String> for FilePathSegment<'static>
impl From<String> for FilePathSegment<'static>
Source§impl FromStr for FilePathSegment<'static>
impl FromStr for FilePathSegment<'static>
Source§impl Hash for FilePathSegment<'_>
impl Hash for FilePathSegment<'_>
Source§impl Ord for FilePathSegment<'_>
impl Ord for FilePathSegment<'_>
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq<&str> for FilePathSegment<'_>
impl PartialEq<&str> for FilePathSegment<'_>
Source§impl PartialEq<FilePathSegment<'_>> for SpecialNotFilePathSegments<'_>
impl PartialEq<FilePathSegment<'_>> for SpecialNotFilePathSegments<'_>
Source§impl PartialEq<FilePathSegment<'_>> for FilePathSegments<'_>
impl PartialEq<FilePathSegment<'_>> for FilePathSegments<'_>
Source§impl PartialEq<FilePathSegment<'_>> for str
impl PartialEq<FilePathSegment<'_>> for str
Source§impl PartialEq<FilePathSegment<'_>> for &str
impl PartialEq<FilePathSegment<'_>> for &str
Source§impl PartialEq<FilePathSegment<'_>> for String
impl PartialEq<FilePathSegment<'_>> for String
Source§impl PartialEq<FilePathSegment<'_>> for FilePathSegment<'_>
impl PartialEq<FilePathSegment<'_>> for FilePathSegment<'_>
Source§impl PartialEq<FilePathSegments<'_>> for FilePathSegment<'_>
impl PartialEq<FilePathSegments<'_>> for FilePathSegment<'_>
Source§impl PartialEq<SpecialNotFilePathSegments<'_>> for FilePathSegment<'_>
impl PartialEq<SpecialNotFilePathSegments<'_>> for FilePathSegment<'_>
Source§impl PartialEq<String> for FilePathSegment<'_>
impl PartialEq<String> for FilePathSegment<'_>
Source§impl PartialEq<str> for FilePathSegment<'_>
impl PartialEq<str> for FilePathSegment<'_>
Source§impl PartialOrd<&str> for FilePathSegment<'_>
impl PartialOrd<&str> for FilePathSegment<'_>
Source§impl PartialOrd<Cow<'_, str>> for FilePathSegment<'_>
impl PartialOrd<Cow<'_, str>> for FilePathSegment<'_>
Source§impl PartialOrd<FilePathSegment<'_>> for SpecialNotFilePathSegments<'_>
impl PartialOrd<FilePathSegment<'_>> for SpecialNotFilePathSegments<'_>
Source§impl PartialOrd<FilePathSegment<'_>> for FilePathSegments<'_>
impl PartialOrd<FilePathSegment<'_>> for FilePathSegments<'_>
Source§impl PartialOrd<FilePathSegment<'_>> for str
impl PartialOrd<FilePathSegment<'_>> for str
Source§impl PartialOrd<FilePathSegment<'_>> for &str
impl PartialOrd<FilePathSegment<'_>> for &str
Source§impl PartialOrd<FilePathSegment<'_>> for String
impl PartialOrd<FilePathSegment<'_>> for String
Source§impl PartialOrd<FilePathSegment<'_>> for Cow<'_, str>
impl PartialOrd<FilePathSegment<'_>> for Cow<'_, str>
Source§impl PartialOrd<FilePathSegment<'_>> for FilePathSegment<'_>
impl PartialOrd<FilePathSegment<'_>> for FilePathSegment<'_>
Source§impl PartialOrd<FilePathSegments<'_>> for FilePathSegment<'_>
impl PartialOrd<FilePathSegments<'_>> for FilePathSegment<'_>
Source§impl PartialOrd<SpecialNotFilePathSegments<'_>> for FilePathSegment<'_>
impl PartialOrd<SpecialNotFilePathSegments<'_>> for FilePathSegment<'_>
Source§impl PartialOrd<String> for FilePathSegment<'_>
impl PartialOrd<String> for FilePathSegment<'_>
Source§impl PartialOrd<str> for FilePathSegment<'_>
impl PartialOrd<str> for FilePathSegment<'_>
Auto Trait Implementations§
impl<'a> Freeze for FilePathSegment<'a>
impl<'a> RefUnwindSafe for FilePathSegment<'a>
impl<'a> Send for FilePathSegment<'a>
impl<'a> Sync for FilePathSegment<'a>
impl<'a> Unpin for FilePathSegment<'a>
impl<'a> UnsafeUnpin for FilePathSegment<'a>
impl<'a> UnwindSafe for FilePathSegment<'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