#![no_std] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct SectorId(u32); impl SectorId { pub const fn new(id: u32) -> Self { Self(id) } pub const fn raw(&self) -> u32 { self.0 } } pub trait BlockDevice { fn sector_size(&self) -> usize; fn sector_count(&self) -> usize; fn read_sector(&mut self, sector: SectorId, buf: &mut [u8]) -> bool; fn write_sector(&mut self, sector: SectorId, buf: &[u8]) -> bool; }