Skip to main content

SectorReader

Trait SectorReader 

Source
pub trait SectorReader: Send {
    // Required method
    fn read_sectors(
        &mut self,
        lba: u32,
        count: u16,
        buf: &mut [u8],
    ) -> Result<usize>;

    // Provided method
    fn capacity(&self) -> u32 { ... }
}
Expand description

Read 2048-byte sectors from a disc or disc image.

Required Methods§

Source

fn read_sectors( &mut self, lba: u32, count: u16, buf: &mut [u8], ) -> Result<usize>

Read count sectors starting at lba into buf. buf must be at least count * 2048 bytes.

Provided Methods§

Source

fn capacity(&self) -> u32

Total capacity in sectors, if known.

Implementors§