[−][src]Struct nt_native::Volume
Methods
impl Volume
[src]
pub fn open(name: &NtString) -> Result<Self>
[src]
Requires admin rights!
pub fn open_readonly(name: &NtString) -> Result<Self>
[src]
Requires admin rights!
pub fn open_info(name: &NtString) -> Result<Self>
[src]
To get the volume information only, not to read data!
pub fn device_name(&self) -> Result<NtString>
[src]
Returns the volume device name: \Device\HarddiskVolume3
.
To pass this name to a Win32 function add \\?\GLOBALROOT\
prefix: \\?\GLOBALROOT\Device\HarddiskVolume3
pub fn guid_name(&self) -> Result<NtString>
[src]
Returns the guid volume name: \??\Volume{736d36a8-0000-0000-0000-100000000000}
.
To pass this name to a Win32 function change second char to \
: \\?\Volume{736d36a8-0000-0000-0000-100000000000}
pub fn id(&self) -> Result<Vec<u8>>
[src]
Returns the unique volume binary ID.
pub fn path_names(&self) -> Result<Vec<NtString>>
[src]
Returns all volume mount points (as DOS names: c:
, c:\mount\folder
, etc. )
pub fn length(&self) -> Result<u64>
[src]
Requires admin rights!
impl Volume
[src]
pub unsafe fn query_info<T: AsByteSliceMut>(
handle: &Handle,
class: FS_INFORMATION_CLASS,
buffer: &mut T
) -> Result<()>
[src]
handle: &Handle,
class: FS_INFORMATION_CLASS,
buffer: &mut T
) -> Result<()>
pub fn fs_information(&self) -> Result<FsInformation>
[src]
pub fn information(&self) -> Result<VolumeInformation>
[src]
pub fn fs_size_information(&self) -> Result<SizeInformation>
[src]
Trait Implementations
impl Clone for Volume
[src]
impl Debug for Volume
[src]
impl Flush for Volume
[src]
fn flush(&self) -> Result<()>
[src]
Requires volume to be opened with Volume::open() and admin rights!
impl From<Handle> for Volume
[src]
impl ReadAt for Volume
[src]
fn read_at(&self, offset: u64, buffer: &mut [u8]) -> Result<usize>
[src]
buffer size should be aligned! Requires volume to be opened with Volume::open() and admin rights!
impl Size for Volume
[src]
fn size(&self) -> Result<u64>
[src]
Requires volume to be opened with Volume::open() and admin rights!
impl WriteAt for Volume
[src]
Auto Trait Implementations
impl RefUnwindSafe for Volume
impl Send for Volume
impl Sync for Volume
impl Unpin for Volume
impl UnwindSafe for Volume
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,