block_device

Crates.ioblock_device
lib.rsblock_device
version0.1.3
sourcesrc
created_at2020-07-09 06:31:19.493092
updated_at2022-02-05 04:11:31.122066
descriptionBlockDevice trait
homepage
repositoryhttps://github.com/Spxg/block_device
max_upload_size
id262772
size3,344
上铺小哥 (Spxg)

documentation

README

BlockDevice trait

pub trait BlockDevice {
    const BLOCK_SIZE: u32 = 512;
    
    type Error;
    fn read(&self, buf: &mut [u8], address: usize, number_of_blocks: usize) -> Result<(), Self::Error>;
    fn write(&self, buf: &[u8], address: usize, number_of_blocks: usize) -> Result<(), Self::Error>;
}
Commit count: 11

cargo fmt