[][src]Struct nt_native::Disk

pub struct Disk(_);

Methods

impl Disk[src]

pub fn open_nth(index: u32) -> Result<Self>[src]

pub fn open(name: &NtString) -> Result<Self>[src]

pub fn open_nth_readonly(index: u32) -> Result<Self>[src]

pub fn open_readonly(name: &NtString) -> Result<Self>[src]

pub fn open_nth_info(index: u32) -> Result<Self>[src]

Usefull only to get device_name without admin rights.

pub fn open_info(name: &NtString) -> Result<Self>[src]

Usefull only to get device_name without admin rights.

pub fn device_name(&self) -> Result<NtString>[src]

Returns the disk device name: \Device\Harddisk0\DR0.

To pass this name to a Win32 function add \\?\GLOBALROOT\ prefix: \\?\GLOBALROOT\ \Device\Harddisk0\DR0

pub fn capacity(&self) -> Result<u64>[src]

pub fn is_readonly(&self) -> Result<bool>[src]

pub fn is_offline(&self) -> Result<bool>[src]

pub fn is_removable(&self) -> Result<bool>[src]

pub fn is_trim_enabled(&self) -> Result<bool>[src]

pub fn has_seek_penalty(&self) -> Result<bool>[src]

pub fn device_number(&self) -> Result<u32>[src]

pub fn attributes(&self) -> Result<u64>[src]

pub fn geometry(&self) -> Result<DISK_GEOMETRY>[src]

Trait Implementations

impl Clone for Disk[src]

impl Debug for Disk[src]

impl Flush for Disk[src]

impl From<Handle> for Disk[src]

impl ReadAt for Disk[src]

impl Size for Disk[src]

impl WriteAt for Disk[src]

Auto Trait Implementations

impl RefUnwindSafe for Disk

impl Send for Disk

impl Sync for Disk

impl Unpin for Disk

impl UnwindSafe for Disk

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.