Skip to main content

FilePath

Struct FilePath 

Source
pub struct FilePath<'a>(/* private fields */);
Expand description

Implementations§

Source§

impl FilePath<'_>

Source

pub fn iter_strs(&self) -> SplitSlashes<'_> ⓘ

The segments as strs.

Source

pub fn get_str(&self, index: isize) -> Option<&str>

The indexth segment as a str.

Source

pub fn range_str<B: RangeBounds<isize>>(&self, range: B) -> Option<&str>

The range of segments as a str.

Source

pub fn iter(&self) -> FilePathSegmentsIter<'_> ⓘ

Source

pub fn get(&self, index: isize) -> Option<FilePathSegment<'_>>

The indexth FilePathSegment.

Source

pub fn range<B: RangeBounds<isize>>( &self, range: B, ) -> Option<FilePathSegments<'_>>

The range of FilePathSegments.

§Examples
use better_url::prelude::*;

let path = FilePath::new("/ab/cd/ef");

assert_eq!(path.range(0..  2).unwrap(), "ab/cd");
assert_eq!(path.range(0.. -1).unwrap(), "ab/cd");
assert_eq!(path.range(0..= 2).unwrap(), "ab/cd/ef");
assert_eq!(path.range(0..=-1).unwrap(), "ab/cd/ef");
Source§

impl FilePath<'_>

Source

pub fn push<'a, T: Into<FilePathSegment<'a>>>(&mut self, value: T) -> bool

Append value.

§Examples
use better_url::prelude::*;

let mut path = FilePath::new("/abc/def/ghi");

path.push("123"); assert_eq!(path, "/abc/def/ghi/123");
path.push(".." ); assert_eq!(path, "/abc/def/ghi/"   );
path.push(".." ); assert_eq!(path, "/abc/def/ghi/"   );
path.push("."  ); assert_eq!(path, "/abc/def/ghi//"  );
Source

pub fn prepend<'a, T: Into<FilePathSegment<'a>>>(&mut self, value: T) -> bool

Prepend value.

§Examples
use better_url::prelude::*;

let mut path = FilePath::new("/abc/def/ghi");

path.prepend("123"); assert_eq!(path, "/123/abc/def/ghi");
path.prepend("."  ); assert_eq!(path, "/123/abc/def/ghi");
path.prepend(".." ); assert_eq!(path, "/123/abc/def/ghi");
Source

pub fn set<'a, T: Into<FilePathSegment<'a>>>( &mut self, index: isize, value: Option<T>, ) -> Result<bool, SetPathError>

Set, insert, or remove the indexth segment.

If value is None and index is out of bounds, does nothing.

§Errors

If value is Some and index is more than 1 out of bounds, returns the error InsertNotFound.

If value is None and index is the only segment, returns the error CantBeEmpty.

§Examples
use better_url::prelude::*;

let mut path = FilePath::new("/c:/abc/def/ghi");

path.set( 1, Some(".." )).unwrap(); assert_eq!(path, "/c:/def/ghi"    );
path.set( 0, Some("e|" )).unwrap(); assert_eq!(path, "/e:/def/ghi"    );
path.set(-4, Some("123")).unwrap(); assert_eq!(path, "/123/e:/def/ghi");
path.set( 2, Some(".." )).unwrap(); assert_eq!(path, "/123/ghi"       );
path.set( 2, Some("456")).unwrap(); assert_eq!(path, "/123/ghi/456"   );
Source

pub fn set_range<'a, T: Into<FilePathSegments<'a>>, B: RangeBounds<isize>>( &mut self, range: B, value: Option<T>, ) -> Result<bool, SetPathError>

Set the range of segments.

§Errors

If Self::range_str returns None, returns the error RangeNotFound.

If value is None and range contains all segments, returns the error CantBeEmpty.

§Examples
use better_url::prelude::*;

let mut path = FilePath::new("/c:/abc/def/ghi");

path.set_range(1..2, Some(".././123/.")).unwrap(); assert_eq!(path, "/c:/123/def/ghi");
Source

pub fn insert<'a, T: Into<FilePathSegment<'a>>>( &mut self, index: isize, value: T, ) -> Result<bool, SetPathError>

Insert a new indexth segment.

§Errors

If the insert isn’t found, returns the error InsertNotFound.

§Examples
use better_url::prelude::*;

let mut path = FilePath::new("/c:/abc/def/ghi");

path.insert( 2, "123").unwrap(); assert_eq!(path, "/c:/abc/123/def/ghi");
path.insert( 3, ".." ).unwrap(); assert_eq!(path, "/c:/abc/def/ghi"    );
path.insert(-1, "123").unwrap(); assert_eq!(path, "/c:/abc/def/ghi/123");
Source§

impl FilePath<'_>

Source

pub fn pop(&mut self) -> Result<bool, SetPathError>

Remove the last segment if it exists.

§Errors

If there’s only one segment, returns the error CantBeEmpty.

Source

pub fn pop_if_empty(&mut self) -> Result<bool, SetPathError>

Remove the last segment if it exists and is empty.

§Errors

If there is only one segment and it’s empty, returns the error CantBeNone.

Source

pub fn remove(&mut self, index: isize) -> Result<bool, SetPathError>

Remove the indexth segment if it exists.

§Errors

If there is only one segment, returns the error CantBeEmpty.

Source§

impl<'a> FilePath<'a>

Source

pub unsafe fn new_unchecked<T: Into<Cow<'a, str>>>(value: T) -> Self

Make a new Self without doing any validity checks.

§Safety

value must be a valid Self literal.

Source

pub fn as_str(&self) -> &str

Borrow as a str.

Source

pub fn segments(&self) -> FilePathSegments<'_>

Source

pub fn into_inner(self) -> Cow<'a, str>

Turn into the inner Cow.

Source

pub fn into_owned(self) -> FilePath<'static>

Turn into an owned Self.

Source

pub fn borrowed(&self) -> FilePath<'_>

Make a borrowing Self.

Source§

impl<'a> FilePath<'a>

Source

pub fn new<T: Into<Self>>(value: T) -> Self

Make a new Self.

Source§

impl<'a> FilePath<'a>

Source

pub fn len(&self) -> usize

The length.

Source

pub fn is_empty(&self) -> bool

If it’s empty.

Trait Implementations§

Source§

impl AsRef<str> for FilePath<'_>

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<str> for FilePath<'_>

Source§

fn borrow(&self) -> &str

Immutably borrows from an owned value. Read more
Source§

impl<'a> Clone for FilePath<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for FilePath<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FilePath<'_>

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FilePath<'_>

Source§

impl<'a, const N: usize> From<&'a Cow<'_, [u8; N]>> for FilePath<'a>

Source§

fn from(value: &'a Cow<'_, [u8; N]>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Cow<'_, [u8]>> for FilePath<'a>

Source§

fn from(value: &'a Cow<'_, [u8]>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Cow<'_, str>> for FilePath<'a>

Source§

fn from(value: &'a Cow<'_, str>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a FilePath<'_>> for Path<'a>

Source§

fn from(value: &'a FilePath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a FilePath<'_>> for OpaquePath<'a>

Source§

fn from(value: &'a FilePath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a FilePath<'_>> for SegmentedPath<'a>

Source§

fn from(value: &'a FilePath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a FilePath<'_>> for FilePath<'a>

Source§

fn from(value: &'a FilePath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a FilePath<'_>> for SpecialNotFilePath<'a>

Source§

fn from(value: &'a FilePath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a FilePath<'_>> for NonSpecialPath<'a>

Source§

fn from(value: &'a FilePath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a NonSpecialPath<'_>> for FilePath<'a>

Source§

fn from(value: &'a NonSpecialPath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a OpaquePath<'_>> for FilePath<'a>

Source§

fn from(value: &'a OpaquePath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Path<'_>> for FilePath<'a>

Source§

fn from(value: &'a Path<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SegmentedPath<'_>> for FilePath<'a>

Source§

fn from(value: &'a SegmentedPath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a SpecialNotFilePath<'_>> for FilePath<'a>

Source§

fn from(value: &'a SpecialNotFilePath<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a String> for FilePath<'a>

Source§

fn from(value: &'a String) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Vec<u8>> for FilePath<'a>

Source§

fn from(value: &'a Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<&'a [u8; N]> for FilePath<'a>

Source§

fn from(value: &'a [u8; N]) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a [u8]> for FilePath<'a>

Source§

fn from(value: &'a [u8]) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for FilePath<'a>

Source§

fn from(value: &'a str) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Cow<'a, [u8]>> for FilePath<'a>

Source§

fn from(value: Cow<'a, [u8]>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Cow<'a, str>> for FilePath<'a>

Source§

fn from(value: Cow<'a, str>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FilePath<'a>> for Path<'a>

Source§

fn from(value: FilePath<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FilePath<'a>> for SegmentedPath<'a>

Source§

fn from(value: FilePath<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FilePath<'a>> for SpecialNotFilePath<'a>

Source§

fn from(value: FilePath<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FilePath<'a>> for NonSpecialPath<'a>

Source§

fn from(value: FilePath<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<FilePath<'a>> for OpaquePath<'a>

Source§

fn from(value: FilePath<'a>) -> Self

Converts to this type from the input type.
Source§

impl From<FilePathSegments<'_>> for FilePath<'static>

Source§

fn from(value: FilePathSegments<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<NonSpecialPath<'a>> for FilePath<'a>

Source§

fn from(value: NonSpecialPath<'a>) -> Self

Converts to this type from the input type.
Source§

impl From<NonSpecialPathSegments<'_>> for FilePath<'static>

Source§

fn from(value: NonSpecialPathSegments<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<OpaquePath<'a>> for FilePath<'a>

Source§

fn from(value: OpaquePath<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Path<'a>> for FilePath<'a>

Source§

fn from(value: Path<'a>) -> Self

Converts to this type from the input type.
Source§

impl From<PathSegments<'_>> for FilePath<'static>

Source§

fn from(value: PathSegments<'_>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<SegmentedPath<'a>> for FilePath<'a>

Source§

fn from(value: SegmentedPath<'a>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<SpecialNotFilePath<'a>> for FilePath<'a>

Source§

fn from(value: SpecialNotFilePath<'a>) -> Self

Converts to this type from the input type.
Source§

impl From<SpecialNotFilePathSegments<'_>> for FilePath<'static>

Source§

fn from(value: SpecialNotFilePathSegments<'_>) -> Self

Converts to this type from the input type.
Source§

impl From<String> for FilePath<'static>

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for FilePath<'static>

Source§

fn from(value: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl FromStr for FilePath<'static>

Source§

type Err = !

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for FilePath<'_>

Source§

fn hash<H: Hasher>(&self, hasher: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a> IntoIterator for &'a FilePath<'_>

Source§

type IntoIter = FilePathSegmentsIter<'a>

Which kind of iterator are we turning this into?
Source§

type Item = FilePathSegment<'a>

The type of the elements being iterated over.
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl Ord for FilePath<'_>

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq<&str> for FilePath<'_>

Source§

fn eq(&self, other: &&str) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Cow<'_, str>> for FilePath<'_>

Source§

fn eq(&self, other: &Cow<'_, str>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<FilePath<'_>> for SpecialNotFilePath<'_>

Source§

fn eq(&self, other: &FilePath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<FilePath<'_>> for NonSpecialPath<'_>

Source§

fn eq(&self, other: &FilePath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<FilePath<'_>> for str

Source§

fn eq(&self, other: &FilePath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<FilePath<'_>> for &str

Source§

fn eq(&self, other: &FilePath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<FilePath<'_>> for String

Source§

fn eq(&self, other: &FilePath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<FilePath<'_>> for Cow<'_, str>

Source§

fn eq(&self, other: &FilePath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<FilePath<'_>> for FilePath<'_>

Source§

fn eq(&self, other: &FilePath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<NonSpecialPath<'_>> for FilePath<'_>

Source§

fn eq(&self, other: &NonSpecialPath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<SpecialNotFilePath<'_>> for FilePath<'_>

Source§

fn eq(&self, other: &SpecialNotFilePath<'_>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<String> for FilePath<'_>

Source§

fn eq(&self, other: &String) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<str> for FilePath<'_>

Source§

fn eq(&self, other: &str) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd<&str> for FilePath<'_>

Source§

fn partial_cmp(&self, other: &&str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<Cow<'_, str>> for FilePath<'_>

Source§

fn partial_cmp(&self, other: &Cow<'_, str>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<FilePath<'_>> for SpecialNotFilePath<'_>

Source§

fn partial_cmp(&self, other: &FilePath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<FilePath<'_>> for NonSpecialPath<'_>

Source§

fn partial_cmp(&self, other: &FilePath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<FilePath<'_>> for str

Source§

fn partial_cmp(&self, other: &FilePath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<FilePath<'_>> for &str

Source§

fn partial_cmp(&self, other: &FilePath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<FilePath<'_>> for String

Source§

fn partial_cmp(&self, other: &FilePath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<FilePath<'_>> for Cow<'_, str>

Source§

fn partial_cmp(&self, other: &FilePath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<FilePath<'_>> for FilePath<'_>

Source§

fn partial_cmp(&self, other: &FilePath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<NonSpecialPath<'_>> for FilePath<'_>

Source§

fn partial_cmp(&self, other: &NonSpecialPath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<SpecialNotFilePath<'_>> for FilePath<'_>

Source§

fn partial_cmp(&self, other: &SpecialNotFilePath<'_>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<String> for FilePath<'_>

Source§

fn partial_cmp(&self, other: &String) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<str> for FilePath<'_>

Source§

fn partial_cmp(&self, other: &str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for FilePath<'a>

§

impl<'a> RefUnwindSafe for FilePath<'a>

§

impl<'a> Send for FilePath<'a>

§

impl<'a> Sync for FilePath<'a>

§

impl<'a> Unpin for FilePath<'a>

§

impl<'a> UnsafeUnpin for FilePath<'a>

§

impl<'a> UnwindSafe for FilePath<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.