[−][src]Struct pakr_rawata::Device
Attached ATA device
Implementations
impl Device
[src]
pub fn open<P>(dev: P) -> Result<Self> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Open device pointed by a specific path.
DO NOT use partition references here (like /dev/sda1
on Linux or /dev/ada0p1
on
FreeBSD). Use only raw disk references, like /dev/sda
on Linux or /dev/ada0
on
FreeBSD.
pub fn close(&mut self)
[src]
Close opened device
pub fn read(&mut self, sector: u64, buffer: &mut [u8]) -> Result<()>
[src]
Read sector(s) from disk.
Buffer size must be multiple of sector size. It bypasses all protections and caches/buffers.
pub fn write(&mut self, sector: u64, buffer: &[u8]) -> Result<()>
[src]
Write sector(s) to disk.
Buffer size must be multiple of sector size. It bypasses all protections and caches/buffers.
pub fn info(&mut self) -> Result<IdentifyDeviceData>
[src]
Get identification record from disk.
Auto Trait Implementations
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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, 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>,