pub struct ScsiCommand {
pub cdb: [u8; 16],
pub data_length: u32,
pub lun: u64,
pub is_read: bool,
pub is_write: bool,
}Expand description
SCSI Command Descriptor Block (CDB) with metadata.
Fields§
§cdb: [u8; 16]Command descriptor block (16 bytes for CDB16 compatibility).
data_length: u32Expected data transfer length.
lun: u64Logical unit number.
is_read: boolWhether this is a read command.
is_write: boolWhether this is a write command.
Implementations§
Source§impl ScsiCommand
impl ScsiCommand
Sourcepub fn test_unit_ready(lun: u64) -> Self
pub fn test_unit_ready(lun: u64) -> Self
Create TEST UNIT READY command.
Sourcepub fn read_capacity_10(lun: u64) -> Self
pub fn read_capacity_10(lun: u64) -> Self
Create READ CAPACITY (10) command.
Sourcepub fn read_10(lun: u64, lba: u32, block_count: u16, block_size: u32) -> Self
pub fn read_10(lun: u64, lba: u32, block_count: u16, block_size: u32) -> Self
Create READ (10) command.
Sourcepub fn write_10(lun: u64, lba: u32, block_count: u16, block_size: u32) -> Self
pub fn write_10(lun: u64, lba: u32, block_count: u16, block_size: u32) -> Self
Create WRITE (10) command.
Sourcepub fn request_sense(lun: u64) -> Self
pub fn request_sense(lun: u64) -> Self
Create REQUEST SENSE command.
Trait Implementations§
Source§impl Clone for ScsiCommand
impl Clone for ScsiCommand
Source§fn clone(&self) -> ScsiCommand
fn clone(&self) -> ScsiCommand
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 ScsiCommand
impl RefUnwindSafe for ScsiCommand
impl Send for ScsiCommand
impl Sync for ScsiCommand
impl Unpin for ScsiCommand
impl UnwindSafe for ScsiCommand
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)