pub struct QueryVolumeInformation { /* private fields */ }Expand description
An owned, marshalable parameter set for GetVolumeInformationByHandleW.
§Example
use std::fs;
use windows_namespace_request_sys::volume::QueryVolumeInformation;
let path = std::env::temp_dir().join(format!("wnrs-vol-{}.tmp", std::process::id()));
fs::write(&path, b"example")?;
let file = fs::File::open(&path)?;
let volume = QueryVolumeInformation::new(file).perform()?;
// A real volume names its filesystem and reports a component limit.
assert!(!volume.filesystem_name().is_empty());
assert!(volume.maximum_component_length() > 0);Implementations§
Source§impl QueryVolumeInformation
impl QueryVolumeInformation
Sourcepub fn new(handle: impl Into<SharedHandle>) -> Self
pub fn new(handle: impl Into<SharedHandle>) -> Self
Begins a request against handle.
The handle names any file or directory on the volume; the volume is what gets reported.
Sourcepub fn handle(&self) -> &SharedHandle
pub fn handle(&self) -> &SharedHandle
The handle being queried, shared with its other holders.
Sourcepub fn perform(&self) -> Outcome<VolumeInformation>
pub fn perform(&self) -> Outcome<VolumeInformation>
Trait Implementations§
Source§impl Clone for QueryVolumeInformation
impl Clone for QueryVolumeInformation
Source§impl Debug for QueryVolumeInformation
impl Debug for QueryVolumeInformation
Source§impl Request for QueryVolumeInformation
impl Request for QueryVolumeInformation
Source§type Error = Win32Error
type Error = Win32Error
How performing it can fail. Read more
Source§type Output = VolumeInformation
type Output = VolumeInformation
What performing the request produces.
Auto Trait Implementations§
impl Freeze for QueryVolumeInformation
impl RefUnwindSafe for QueryVolumeInformation
impl Send for QueryVolumeInformation
impl Sync for QueryVolumeInformation
impl Unpin for QueryVolumeInformation
impl UnsafeUnpin for QueryVolumeInformation
impl UnwindSafe for QueryVolumeInformation
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