pub struct VolumePath(/* private fields */);Expand description
A path naming a volume, in one of the two forms that do: a drive letter, \\.\C:, or a volume
GUID, \\?\Volume{...}. Nothing else is one, so a path that names a file, a directory or a
share cannot be given where a volume is wanted.
Implementations§
Source§impl VolumePath
impl VolumePath
Sourcepub fn drive(letter: char) -> Result<Self, VolumePathError>
pub fn drive(letter: char) -> Result<Self, VolumePathError>
The volume mounted at drive letter letter, A to Z in either case.
§Errors
VolumePathError for any other character.
Sourcepub fn guid(path: &str) -> Result<Self, VolumePathError>
pub fn guid(path: &str) -> Result<Self, VolumePathError>
The volume named by a volume GUID path, such as \\?\Volume{01234567-89ab-cdef-0123-456789abcdef}
or the same with the trailing backslash the enumeration functions give it, which is dropped:
a volume handle is opened without it.
§Errors
VolumePathError for any other form, including a GUID of the wrong shape.
Trait Implementations§
Source§impl Clone for VolumePath
impl Clone for VolumePath
Source§impl Debug for VolumePath
impl Debug for VolumePath
impl Eq for VolumePath
Source§impl PartialEq for VolumePath
impl PartialEq for VolumePath
impl StructuralPartialEq for VolumePath
Auto Trait Implementations§
impl Freeze for VolumePath
impl RefUnwindSafe for VolumePath
impl Send for VolumePath
impl Sync for VolumePath
impl Unpin for VolumePath
impl UnsafeUnpin for VolumePath
impl UnwindSafe for VolumePath
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