#[non_exhaustive]pub enum WindowsPrefix<'a> {
Verbatim(&'a str),
VerbatimUNC(&'a str, &'a str),
VerbatimDisk(char),
DeviceNS(&'a str),
UNC(&'a str, &'a str),
Disk(char),
}Expand description
Leading prefix of a Windows path.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Verbatim(&'a str)
Verbatim prefix, e.g. \\?\cat_pics.
VerbatimUNC(&'a str, &'a str)
Verbatim UNC prefix, e.g. \\?\UNC\server\share.
VerbatimDisk(char)
Verbatim disk prefix, e.g. \\?\C:.
DeviceNS(&'a str)
Device namespace prefix, e.g. \\.\COM42.
UNC(&'a str, &'a str)
UNC prefix, e.g. \\server\share.
Disk(char)
Disk prefix, e.g. C:.
Implementations§
Source§impl WindowsPrefix<'_>
impl WindowsPrefix<'_>
Sourcepub fn is_verbatim(&self) -> bool
pub fn is_verbatim(&self) -> bool
Returns whether this prefix uses verbatim (\\?\) syntax.
Trait Implementations§
Source§impl<'a> Clone for WindowsPrefix<'a>
impl<'a> Clone for WindowsPrefix<'a>
Source§fn clone(&self) -> WindowsPrefix<'a>
fn clone(&self) -> WindowsPrefix<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for WindowsPrefix<'a>
Source§impl<'a> Debug for WindowsPrefix<'a>
impl<'a> Debug for WindowsPrefix<'a>
impl<'a> Eq for WindowsPrefix<'a>
Source§impl<'a> From<Utf8WindowsPrefix<'a>> for WindowsPrefix<'a>
impl<'a> From<Utf8WindowsPrefix<'a>> for WindowsPrefix<'a>
Source§impl<'a> Hash for WindowsPrefix<'a>
impl<'a> Hash for WindowsPrefix<'a>
Source§impl<'a> Ord for WindowsPrefix<'a>
impl<'a> Ord for WindowsPrefix<'a>
Source§fn cmp(&self, other: &WindowsPrefix<'a>) -> Ordering
fn cmp(&self, other: &WindowsPrefix<'a>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<'a> PartialEq for WindowsPrefix<'a>
impl<'a> PartialEq for WindowsPrefix<'a>
Source§impl<'a> PartialOrd for WindowsPrefix<'a>
impl<'a> PartialOrd for WindowsPrefix<'a>
impl<'a> StructuralPartialEq for WindowsPrefix<'a>
Auto Trait Implementations§
impl<'a> Freeze for WindowsPrefix<'a>
impl<'a> RefUnwindSafe for WindowsPrefix<'a>
impl<'a> Send for WindowsPrefix<'a>
impl<'a> Sync for WindowsPrefix<'a>
impl<'a> Unpin for WindowsPrefix<'a>
impl<'a> UnsafeUnpin for WindowsPrefix<'a>
impl<'a> UnwindSafe for WindowsPrefix<'a>
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<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