Skip to main content

ReadSpeed

Enum ReadSpeed 

Source
pub enum ReadSpeed {
    Unchanged,
    Optimal,
    CustomMultiplier(u8),
}
Expand description

A platform-independent read-speed request for an optical drive.

The requested speed is a preference, not a guarantee. Under MMC, a drive may select the requested rate or a higher supported rate; the OS and drive firmware may further adjust or reject the request.

A successful speed change may remain active for subsequent reads. This crate does not restore the previous setting, although the OS, firmware, or other software may change it later.

Variants§

§

Unchanged

Do not issue a speed-change request.

This is the default in ReadOptions. The drive retains whatever speed was previously selected by the OS, firmware, or another application.

§

Optimal

Ask the platform and drive to select an automatic or optimal read speed.

On macOS and Windows, this uses the 0xFFFF drive-selected/maximum-speed sentinel associated with SET CD SPEED (0xBB). On Linux, CDROM_SELECT_SPEED is called with a speed of zero to request automatic selection.

§

CustomMultiplier(u8)

Request a multiple of the nominal CD-DA 1× rate.

One unit represents 176.4 kB/s, so CustomMultiplier(1) requests 1× and CustomMultiplier(10) requests 10×. macOS and Windows convert the multiplier to kB/s, while Linux passes it as a speed multiplier.

CustomMultiplier(0) is equivalent to Optimal.

Trait Implementations§

Source§

impl Clone for ReadSpeed

Source§

fn clone(&self) -> ReadSpeed

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ReadSpeed

Source§

impl Debug for ReadSpeed

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.