[][src]Struct nt_native::Volume

pub struct 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]

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]

fn write_at(&self, offset: u64, data: &[u8]) -> Result<usize>[src]

buffer size should be aligned! Requires volume to be opened with Volume::open() and admin rights!

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.