pub trait BlockDevice: Device {
// Required methods
fn get_id(&self) -> usize;
fn get_disk_name(&self) -> &'static str;
fn get_disk_size(&self) -> usize;
fn enqueue_request(&mut self, request: Box<BlockIORequest>);
fn process_requests(&mut self) -> Vec<BlockIOResult>;
}
Expand description
Block device interface
This trait defines the interface for block devices. It provides methods for querying device information and handling I/O requests.
Required Methods§
Sourcefn get_disk_name(&self) -> &'static str
fn get_disk_name(&self) -> &'static str
Get the disk name
Sourcefn get_disk_size(&self) -> usize
fn get_disk_size(&self) -> usize
Get the disk size in bytes
Sourcefn enqueue_request(&mut self, request: Box<BlockIORequest>)
fn enqueue_request(&mut self, request: Box<BlockIORequest>)
Enqueue a block I/O request