pub trait BlockDevice {
// Required methods
fn read_block(&mut self, lba: u64, buf: &mut [u8]) -> Result<(), ()>;
fn block_size(&self) -> u64;
}Expand description
Trait for block-based storage devices.
Required Methods§
Sourcefn block_size(&self) -> u64
fn block_size(&self) -> u64
Get the block size in bytes (typically 512 or 4096).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".