Crates.io | block_device |
lib.rs | block_device |
version | 0.1.3 |
source | src |
created_at | 2020-07-09 06:31:19.493092 |
updated_at | 2022-02-05 04:11:31.122066 |
description | BlockDevice trait |
homepage | |
repository | https://github.com/Spxg/block_device |
max_upload_size | |
id | 262772 |
size | 3,344 |
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>;
}