Skip to main content

PathBufDyn

Enum PathBufDyn 

Source
pub enum PathBufDyn {
    Os(PathBuf),
    Unix(UnixPathBuf),
}

Variants§

Implementations§

Source§

impl PathBufDyn

Source

pub unsafe fn from_encoded_bytes<K>(kind: K, bytes: Vec<u8>) -> Self
where K: Into<PathKind>,

Source

pub fn from_components<'a, K, I>(kind: K, iter: I) -> Result<Self, PathDynError>
where K: Into<PathKind>, I: IntoIterator<Item = Component<'a>>,

Source

pub fn into_encoded_bytes(self) -> Vec<u8>

Source

pub fn into_os(self) -> Result<PathBuf, PathDynError>

Source

pub fn into_unix(self) -> Result<UnixPathBuf, PathDynError>

Source

pub fn new(kind: PathKind) -> Self

Source

pub fn try_extend<T>(&mut self, paths: T) -> Result<(), PathDynError>
where T: IntoIterator, T::Item: AsPath,

Source

pub fn try_push<T>(&mut self, path: T) -> Result<(), PathDynError>
where T: AsPath,

Source

pub fn try_set_name<T>(&mut self, name: T) -> Result<(), SetNameError>
where T: AsStrand,

Source

pub fn with<K>(kind: K, bytes: Vec<u8>) -> Result<Self, PathDynError>
where K: Into<PathKind>,

Source

pub fn with_capacity<K>(kind: K, capacity: usize) -> Self
where K: Into<PathKind>,

Source

pub fn with_str<K, S>(kind: K, s: S) -> Self
where K: Into<PathKind>, S: Into<String>,

Trait Implementations§

Source§

impl AsPath for PathBufDyn

Source§

fn as_path(&self) -> PathDyn<'_>

Source§

impl AsStrand for PathBufDyn

Source§

fn as_strand(&self) -> Strand<'_>

Source§

impl AsStrand for &PathBufDyn

Source§

fn as_strand(&self) -> Strand<'_>

Source§

impl Clone for PathBufDyn

Source§

fn clone(&self) -> PathBufDyn

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 Debug for PathBufDyn

Source§

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

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

impl Eq for PathBufDyn

Source§

impl Equivalent<PathBufDyn> for PathDyn<'_>

Source§

fn equivalent(&self, key: &PathBufDyn) -> bool

Compare self to key and return true if they are equal.
Source§

impl Equivalent<PathDyn<'_>> for PathBufDyn

Source§

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>

Source§

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

Converts to this type from the input type.
Source§

impl<P> From<&P> for PathBufDyn
where P: PathLike,

Source§

fn from(value: &P) -> Self

Converts to this type from the input type.
Source§

impl From<&Path> for PathBufDyn

Source§

fn from(value: &Path) -> Self

Converts to this type from the input type.
Source§

impl From<Cow<'_, Path>> for PathBufDyn

Source§

fn from(value: Cow<'_, Path>) -> Self

Converts to this type from the input type.
Source§

impl From<PathBuf<UnixEncoding>> for PathBufDyn

Source§

fn from(value: UnixPathBuf) -> Self

Converts to this type from the input type.
Source§

impl From<PathBuf> for PathBufDyn

Source§

fn from(value: PathBuf) -> Self

Converts to this type from the input type.
Source§

impl From<PathBufDyn> for PathCow<'_>

Source§

fn from(value: PathBufDyn) -> Self

Converts to this type from the input type.
Source§

impl From<PathCow<'_>> for PathBufDyn

Source§

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

Converts to this type from the input type.
Source§

impl From<PathDyn<'_>> for PathBufDyn

Source§

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

Converts to this type from the input type.
Source§

impl Hash for PathBufDyn

Source§

fn hash<H: Hasher>(&self, state: &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 IntoStrand for PathBufDyn

Source§

impl IntoStrand for &PathBufDyn

Source§

impl PartialEq for PathBufDyn

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl PartialEq<PathBufDyn> for PathDyn<'_>

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl PartialEq<PathDyn<'_>> for PathBufDyn

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl PartialEq<PathDyn<'_>> for &PathBufDyn

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl PathLike for PathBufDyn

Source§

fn as_os(&self) -> Result<&Path, PathDynError>

Source§

fn as_unix(&self) -> Result<&UnixPath, PathDynError>

Source§

fn components(&self) -> Components<'_>

Source§

fn display(&self) -> Display<'_>

Source§

fn encoded_bytes(&self) -> &[u8]

Source§

fn ext(&self) -> Option<Strand<'_>>

Source§

fn has_root(&self) -> bool

Source§

fn is_absolute(&self) -> bool

Source§

fn is_empty(&self) -> bool

Source§

fn is_hidden(&self) -> bool

Source§

fn kind(&self) -> PathKind

Source§

fn len(&self) -> usize

Source§

fn name(&self) -> Option<Strand<'_>>

Source§

fn parent(&self) -> Option<PathDyn<'_>>

Source§

fn rsplit_pred<T>(&self, pred: T) -> Option<(PathDyn<'_>, PathDyn<'_>)>

Source§

fn stem(&self) -> Option<Strand<'_>>

Source§

fn to_os_owned(&self) -> Result<PathBuf, PathDynError>

Source§

fn to_owned(&self) -> PathBufDyn

Source§

fn to_str(&self) -> Result<&str, Utf8Error>

Source§

fn to_string_lossy(&self) -> Cow<'_, str>

Source§

fn try_ends_with<T>(&self, child: T) -> Result<bool, EndsWithError>
where T: AsStrand,

Source§

fn try_join<T>(&self, path: T) -> Result<PathBufDyn, JoinError>
where T: AsStrand,

Source§

fn try_rsplit_seq<T>( &self, pat: T, ) -> Result<(PathDyn<'_>, PathDyn<'_>), RsplitOnceError>
where T: AsStrand,

Source§

fn try_starts_with<T>(&self, base: T) -> Result<bool, StartsWithError>
where T: AsStrand,

Source§

fn try_strip_prefix<T>(&self, base: T) -> Result<PathDyn<'_>, StripPrefixError>
where T: AsStrand,

Source§

fn try_strip_suffix<T>( &self, suffix: T, ) -> Result<PathDyn<'_>, StripSuffixError>
where T: AsStrand,

Source§

impl TryFrom<PathBufDyn> for PathBuf

Source§

type Error = PathDynError

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

fn try_from(value: PathBufDyn) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<PathBufDyn> for UnixPathBuf

Source§

type Error = PathDynError

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

fn try_from(value: PathBufDyn) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

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> DataAny for T
where T: Any + Send + Sync + DynClone,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoPointee for T

Source§

impl<T> MaybeSend for T

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.