rcore-tutorial/easy-fs/src/block_dev.rs
2020-12-18 15:56:11 +08:00

6 lines
182 B
Rust

use core::any::Any;
pub trait BlockDevice : Send + Sync + Any {
fn read_block(&self, block_id: usize, buf: &mut [u8]);
fn write_block(&self, block_id: usize, buf: &[u8]);
}