pub struct ScsiError {
pub op: ScsiOp,
pub lba: Option<u32>,
pub sectors: Option<u32>,
pub scsi_status: u8,
pub sense_key: Option<u8>,
pub asc: Option<u8>,
pub ascq: Option<u8>,
}Expand description
Structured SCSI failure context captured at the call site.
This keeps transport/protocol details (status + sense) separate from plain I/O failures, which allows retry logic and application diagnostics to branch on SCSI metadata.
Fields§
§op: ScsiOpOperation that failed.
lba: Option<u32>Starting logical block address used by the failed command, when applicable.
sectors: Option<u32>Sector count requested by the failed command, when applicable.
scsi_status: u8SCSI status byte reported by the device (for example 0x02 for CHECK CONDITION).
sense_key: Option<u8>Sense key nibble from fixed-format sense data (if sense data was returned).
asc: Option<u8>Additional Sense Code from sense data (if available).
ascq: Option<u8>Additional Sense Code Qualifier paired with asc (if available).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScsiError
impl RefUnwindSafe for ScsiError
impl Send for ScsiError
impl Sync for ScsiError
impl Unpin for ScsiError
impl UnwindSafe for ScsiError
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