pub struct DriveModel { /* private fields */ }Expand description
A drive: where the head is, how long a read takes, how long a seek takes.
Implementations§
Source§impl DriveModel
impl DriveModel
Sourcepub fn double_speed() -> Self
pub fn double_speed() -> Self
Double speed, nominal seeks, the measured table, clamped beyond 512 sectors, instant abort.
Sourcepub fn single_speed() -> Self
pub fn single_speed() -> Self
The same at single speed. The seek table was measured at double speed and is kept as is (an assumption).
Sourcepub fn with_variance(self, variance: Variance) -> Self
pub fn with_variance(self, variance: Variance) -> Self
Choose how seek time varies between runs.
Sourcepub fn with_far_seek_millis(self, millis: u32) -> Self
pub fn with_far_seek_millis(self, millis: u32) -> Self
Seek time for any distance beyond the measured 512 sectors. Unmeasured: the default clamps to the 512-sector value.
Sourcepub fn with_abort_micros(self, micros: u32) -> Self
pub fn with_abort_micros(self, micros: u32) -> Self
Time a cancelled read takes to stop (default 0: unmeasured).
Sourcepub fn abort_micros(&self) -> u32
pub fn abort_micros(&self) -> u32
Time a cancelled read takes to stop.
Sourcepub fn micros_per_sector(&self) -> u32
pub fn micros_per_sector(&self) -> u32
Microseconds to read one sector.
Sourcepub fn nominal_seek_micros(&self, distance: u32) -> u32
pub fn nominal_seek_micros(&self, distance: u32) -> u32
The table seek time in microseconds for a jump of distance sectors,
before variance. Linear between measured points (an assumption).
Trait Implementations§
Source§impl Clone for DriveModel
impl Clone for DriveModel
Source§fn clone(&self) -> DriveModel
fn clone(&self) -> DriveModel
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DriveModel
impl RefUnwindSafe for DriveModel
impl Send for DriveModel
impl Sync for DriveModel
impl Unpin for DriveModel
impl UnsafeUnpin for DriveModel
impl UnwindSafe for DriveModel
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)