Struct PrefixComponent
pub struct PrefixComponent<'a> { pub(in ::path) raw: &'a OsStr, pub(in ::path) parsed: Prefix<'a> }
A structure wrapping a Windows path prefix as well as its unparsed string representation.
In addition to the parsed Prefix information returned by kind,
PrefixComponent also holds the raw and unparsed OsStr slice,
returned by as_os_str.
Instances of this struct can be obtained by matching against the
Prefix variant on Component.
Does not occur on Unix.
Examples
# if cfg!
Fields
raw: &'a OsStrThe prefix as an unparsed
OsStrslice.parsed: Prefix<'a>The parsed prefix data.
Implementations
impl<'a> PrefixComponent<'a>
Trait Implementations
impl Hash for PrefixComponent<'_>
fn hash<H: Hasher>(&self, h: &mut H)
impl Ord for PrefixComponent<'_>
fn cmp(&self, other: &Self) -> Ordering
impl<'a> Clone for PrefixComponent<'a>
fn clone(&self) -> Self
impl<'a> Copy for PrefixComponent<'a>
impl<'a> Debug for PrefixComponent<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> Eq for PrefixComponent<'a>
fn assert_fields_are_eq(&self)
impl<'a> PartialEq for PrefixComponent<'a>
fn eq(&self, other: &PrefixComponent<'a>) -> bool
impl<'a> PartialOrd for PrefixComponent<'a>
fn partial_cmp(&self, other: &PrefixComponent<'a>) -> Option<Ordering>
impl<'a> TrivialClone for PrefixComponent<'a>
Auto Trait Implementations
impl<'a> Freeze for PrefixComponent<'a>
impl<'a> RefUnwindSafe for PrefixComponent<'a>
impl<'a> Send for PrefixComponent<'a>
impl<'a> Sync for PrefixComponent<'a>
impl<'a> Unpin for PrefixComponent<'a>
impl<'a> UnsafeUnpin for PrefixComponent<'a>
impl<'a> UnwindSafe for PrefixComponent<'a>
Blanket Implementations
impl<T> Any for PrefixComponent<'a>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for PrefixComponent<'a>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for PrefixComponent<'a>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for PrefixComponent<'a>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for PrefixComponent<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for PrefixComponent<'a>
where
T: Copy + Debug,
impl<T> SizeHint for PrefixComponent<'a>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for PrefixComponent<'a>
impl<T> ToOwned for PrefixComponent<'a>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for PrefixComponent<'a>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for PrefixComponent<'a>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for PrefixComponent<'a>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>