pub enum CdReaderError {
Io(Error),
Scsi(ScsiError),
Parse(String),
TrackFormatMismatch {
track_number: u8,
track_is_audio: bool,
requested_format: SectorReadFormat,
},
CannotDetectTrackFormat {
track_number: u8,
data_mode: Option<u8>,
},
NoUsableDrive,
Backend(Box<dyn Error + Send + Sync + 'static>),
}Expand description
Top-level error type returned by cd-da-reader.
Variants§
Io(Error)
OS/transport I/O error (open/ioctl/DeviceIoControl/FFI command failure, etc.).
Scsi(ScsiError)
Device reported a SCSI command failure with status/sense context.
Parse(String)
Parsing failure for command response payloads.
TrackFormatMismatch
The requested sector format is incompatible with the track type.
Fields
§
requested_format: SectorReadFormatFormat requested by the caller.
CannotDetectTrackFormat
The track’s sector format could not be determined.
Fields
NoUsableDrive
Drive enumeration completed without finding a usable audio CD.
Backend(Box<dyn Error + Send + Sync + 'static>)
A pluggable AudioSectorReader backing failed
while reading sectors. The backing’s own error is boxed and preserved as
this error’s source, so it can be displayed
or downcast without being flattened into this SCSI-oriented enum.
Trait Implementations§
Source§impl Debug for CdReaderError
impl Debug for CdReaderError
Source§impl Display for CdReaderError
impl Display for CdReaderError
Source§impl Error for CdReaderError
impl Error for CdReaderError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for CdReaderError
impl !UnwindSafe for CdReaderError
impl Freeze for CdReaderError
impl Send for CdReaderError
impl Sync for CdReaderError
impl Unpin for CdReaderError
impl UnsafeUnpin for CdReaderError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more