[][src]Struct pakr_rawata::IdentifyDeviceData

pub struct IdentifyDeviceData(_);

ATA standard IDENTIFY_DEVICE structure.

It is described in the table 55 of ATA/ATAPI Command Set.

Due to a 16-bit bus architecture of ATA, that structure contains 256 16-bit words, not 512 bytes. Side effect of this layout is that all strings have pairwise swapped letters. String "Abcdef" is stored in memory as "bAdcfe",

Numeric values are stored as LE-LE, that is bytes within word are little-endian and for multi-word values words themselves are also little-endian. This is demonstrated in IdentifyDeviceData::get_sector_count.

Implementations

impl IdentifyDeviceData[src]

pub fn get_sector_count(&self) -> u64[src]

Return total sector count of disk

pub fn get_model(&self) -> String[src]

Return model info of disk

pub fn get_serial(&self) -> String[src]

Return serial number of disk

pub fn get_firmware(&self) -> String[src]

Return firmware revision of disk

Trait Implementations

impl Clone for IdentifyDeviceData[src]

impl Copy for IdentifyDeviceData[src]

impl Debug for IdentifyDeviceData[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Return basic drive information

Auto Trait Implementations

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.