pub struct WindowsPath { /* private fields */ }Expand description
A path for Windows systems.
Trait Implementations§
Source§impl AsRef<str> for WindowsPath
impl AsRef<str> for WindowsPath
Source§impl Clone for WindowsPath
impl Clone for WindowsPath
Source§fn clone(&self) -> WindowsPath
fn clone(&self) -> WindowsPath
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowsPath
impl Debug for WindowsPath
Source§impl Div for &WindowsPath
impl Div for &WindowsPath
Source§impl Div for WindowsPath
impl Div for WindowsPath
Source§impl<'a> From<&'a WindowsPath> for UnifiedPath<'a>
impl<'a> From<&'a WindowsPath> for UnifiedPath<'a>
Source§fn from(path: &'a WindowsPath) -> Self
fn from(path: &'a WindowsPath) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for WindowsPath
impl<'a> From<&'a str> for WindowsPath
Source§impl From<String> for WindowsPath
impl From<String> for WindowsPath
Source§impl Ord for WindowsPath
impl Ord for WindowsPath
Source§fn cmp(&self, other: &WindowsPath) -> Ordering
fn cmp(&self, other: &WindowsPath) -> Ordering
1.21.0 · 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
Source§impl ParsablePath for WindowsPath
impl ParsablePath for WindowsPath
Source§const PRIMARY_COMPONENT_SEPARATOR: char = '\\'
const PRIMARY_COMPONENT_SEPARATOR: char = '\\'
The primary component separator. Read more
Source§const SECONDARY_COMPONENT_SEPARATOR: Option<char>
const SECONDARY_COMPONENT_SEPARATOR: Option<char>
The secondary component separator. Read more
Source§const EXTENSION_SEPARATOR: char = '.'
const EXTENSION_SEPARATOR: char = '.'
The extension separator.
Source§const DRIVE_SEPARATOR: Option<char>
const DRIVE_SEPARATOR: Option<char>
The drive separator.
Source§fn as_string_mut(&mut self) -> &mut String
fn as_string_mut(&mut self) -> &mut String
Returns a mutable reference to the path as a string.
Source§const COMPONENT_SEPARATORS: &'static [char] = _
const COMPONENT_SEPARATORS: &'static [char] = _
The component separators. Read more
Source§fn split_first_lexical(path: &str) -> (&str, Option<(&str, &str)>)
fn split_first_lexical(path: &str) -> (&str, Option<(&str, &str)>)
Returns the first component of the path and the rest of the path in a lexical way.
That means,
.. and . are not resolved or even considered.Source§fn split_first_component(
s: &str,
progressed: bool,
) -> (Option<Component<'_>>, Option<&str>)
fn split_first_component( s: &str, progressed: bool, ) -> (Option<Component<'_>>, Option<&str>)
Returns the first component of the path and the rest of the path.
Source§fn split_last_lexical(path: &str) -> (Option<(&str, &str)>, &str)
fn split_last_lexical(path: &str) -> (Option<(&str, &str)>, &str)
Returns the parent of the given path and the last component of the path in a lexical way.
That means,
.. and . are not resolved or even considered.Source§fn split_last_component(
s: &str,
_: bool,
) -> (Option<&str>, Option<Component<'_>>)
fn split_last_component( s: &str, _: bool, ) -> (Option<&str>, Option<Component<'_>>)
Returns the parent of the path and the last component of the path.
Source§fn split_last(s: &str) -> (Option<&str>, Option<&str>)
fn split_last(s: &str) -> (Option<&str>, Option<&str>)
Returns the parent of the path and the last component of the path.
Source§fn file_name(s: &str) -> Option<&str>
fn file_name(s: &str) -> Option<&str>
Returns the last component of the path, if there is one.
Source§fn join_in_place(parent: &mut String, child: &str)
fn join_in_place(parent: &mut String, child: &str)
Joins the given path with the parent in place.
Source§fn split_extension(s: &str) -> (&str, Option<&str>)
fn split_extension(s: &str) -> (&str, Option<&str>)
Returns the file stem and extension of the path.
Source§fn with_extension(path: &str, ext: &str) -> String
fn with_extension(path: &str, ext: &str) -> String
Replace the extension of the path with the given extension in place.
Source§fn split_driver(path: &str) -> (Option<&str>, &str)
fn split_driver(path: &str) -> (Option<&str>, &str)
Returns the driver of the path and the rest of the path.
Source§fn is_absolute(path: &str) -> bool
fn is_absolute(path: &str) -> bool
Returns whether the path is absolute.
Source§impl PartialEq for WindowsPath
impl PartialEq for WindowsPath
Source§impl PartialOrd for WindowsPath
impl PartialOrd for WindowsPath
impl Eq for WindowsPath
impl StructuralPartialEq for WindowsPath
Auto Trait Implementations§
impl Freeze for WindowsPath
impl RefUnwindSafe for WindowsPath
impl Send for WindowsPath
impl Sync for WindowsPath
impl Unpin for WindowsPath
impl UnwindSafe for WindowsPath
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<P> PurePath for P
impl<P> PurePath for P
Source§fn join_in_place(&mut self, path: &P)
fn join_in_place(&mut self, path: &P)
Joins the given path in place.
Source§fn is_absolute(&self) -> bool
fn is_absolute(&self) -> bool
Returns whether the path is absolute.
Source§fn components(&self) -> impl DoubleEndedIterator
fn components(&self) -> impl DoubleEndedIterator
Returns the components of the path.