pub enum PathStyle {
Posix,
Windows,
}Variants§
Implementations§
Source§impl PathStyle
impl PathStyle
pub const fn local() -> Self
pub fn primary_separator(&self) -> &'static str
pub fn separators(&self) -> &'static [&'static str]
pub fn separators_ch(&self) -> &'static [char]
pub fn is_absolute(&self, path_like: &str) -> bool
pub fn is_windows(&self) -> bool
pub fn is_posix(&self) -> bool
pub fn join( self, left: impl AsRef<Path>, right: impl AsRef<Path>, ) -> Option<String>
pub fn join_path( self, left: impl AsRef<Path>, right: impl AsRef<Path>, ) -> Result<PathBuf>
pub fn normalize(self, path_like: &str) -> String
pub fn split(self, path_like: &str) -> (Option<&str>, &str)
pub fn strip_prefix<'a>( &self, child: &'a Path, parent: &'a Path, ) -> Option<Cow<'a, RelPath>>
Trait Implementations§
impl Copy for PathStyle
impl Eq for PathStyle
impl StructuralPartialEq for PathStyle
Auto Trait Implementations§
impl Freeze for PathStyle
impl RefUnwindSafe for PathStyle
impl Send for PathStyle
impl Sync for PathStyle
impl Unpin for PathStyle
impl UnsafeUnpin for PathStyle
impl UnwindSafe for PathStyle
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> 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.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 more