pub enum PathDyn<'p> {
Os(&'p Path),
Unix(&'p UnixPath),
}Variants§
Implementations§
Source§impl<'p> PathDyn<'p>
impl<'p> PathDyn<'p>
pub fn as_os(self) -> Result<&'p Path, PathDynError>
pub fn as_unix(self) -> Result<&'p UnixPath, PathDynError>
pub fn components(self) -> Components<'p> ⓘ
pub fn display(self) -> Display<'p>
pub fn encoded_bytes(self) -> &'p [u8] ⓘ
pub fn ext(self) -> Option<Strand<'p>>
pub unsafe fn from_encoded_bytes<K>(kind: K, bytes: &'p [u8]) -> Self
pub fn has_root(self) -> bool
pub fn is_absolute(self) -> bool
pub fn is_empty(self) -> bool
pub fn kind(self) -> PathKind
pub fn len(self) -> usize
pub fn name(self) -> Option<Strand<'p>>
pub fn parent(self) -> Option<Self>
pub fn rsplit_pred<T>(self, pred: T) -> Option<(Self, Self)>where
T: Utf8BytePredictor,
pub fn stem(self) -> Option<Strand<'p>>
pub fn to_os_owned(self) -> Result<PathBuf, PathDynError>
pub fn to_owned(self) -> PathBufDyn
pub fn to_str(self) -> Result<&'p str, Utf8Error>
pub fn to_string_lossy(self) -> Cow<'p, str>
pub fn to_unix_owned(self) -> Result<UnixPathBuf, PathDynError>
pub fn try_ends_with<T>(self, child: T) -> Result<bool, EndsWithError>where
T: AsStrand,
pub fn try_join<T>(self, path: T) -> Result<PathBufDyn, JoinError>where
T: AsStrand,
pub fn try_rsplit_seq<T>(self, pat: T) -> Result<(Self, Self), RsplitOnceError>where
T: AsStrand,
pub fn try_starts_with<T>(self, base: T) -> Result<bool, StartsWithError>where
T: AsStrand,
pub fn try_strip_prefix<T>(self, base: T) -> Result<Self, StripPrefixError>where
T: AsStrand,
pub fn try_strip_suffix<T>(self, suffix: T) -> Result<Self, StripSuffixError>where
T: AsStrand,
pub fn with<K, S>(kind: K, strand: &'p S) -> Result<Self, StrandError>
pub fn with_str<K, S>(kind: K, s: &'p S) -> Self
Trait Implementations§
impl<'p> Copy for PathDyn<'p>
impl<'p> Eq for PathDyn<'p>
Source§impl Equivalent<PathBufDyn> for PathDyn<'_>
impl Equivalent<PathBufDyn> for PathDyn<'_>
Source§fn equivalent(&self, key: &PathBufDyn) -> bool
fn equivalent(&self, key: &PathBufDyn) -> bool
Compare self to
key and return true if they are equal.Source§impl Equivalent<PathDyn<'_>> for PathBufDyn
impl Equivalent<PathDyn<'_>> for PathBufDyn
Source§fn equivalent(&self, key: &PathDyn<'_>) -> bool
fn equivalent(&self, key: &PathDyn<'_>) -> bool
Compare self to
key and return true if they are equal.Source§impl<'a> From<&'a PathBufDyn> for PathDyn<'a>
impl<'a> From<&'a PathBufDyn> for PathDyn<'a>
Source§fn from(value: &'a PathBufDyn) -> Self
fn from(value: &'a PathBufDyn) -> Self
Converts to this type from the input type.
Source§impl From<PathDyn<'_>> for PathBufDyn
impl From<PathDyn<'_>> for PathBufDyn
Source§impl PartialEq<PathBufDyn> for PathDyn<'_>
impl PartialEq<PathBufDyn> for PathDyn<'_>
Source§impl PartialEq<PathDyn<'_>> for PathBufDyn
impl PartialEq<PathDyn<'_>> for PathBufDyn
Source§impl PartialEq<PathDyn<'_>> for &PathBufDyn
impl PartialEq<PathDyn<'_>> for &PathBufDyn
impl<'p> StructuralPartialEq for PathDyn<'p>
Auto Trait Implementations§
impl<'p> Freeze for PathDyn<'p>
impl<'p> RefUnwindSafe for PathDyn<'p>
impl<'p> Send for PathDyn<'p>
impl<'p> Sync for PathDyn<'p>
impl<'p> Unpin for PathDyn<'p>
impl<'p> UnsafeUnpin for PathDyn<'p>
impl<'p> UnwindSafe for PathDyn<'p>
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§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