pub trait BlockStorage: Send {
    fn block_count(&self) -> u32;
    fn block_size(&self) -> u32;
    fn block_info<'a>(
        &self,
        block: u32,
        name_buf: &'a mut [u8]
    ) -> Result<BlockInfo<'a>, ()>; fn block_open(&mut self, block: u32) -> Result<(), ()>; fn block_write(
        &mut self,
        block: u32,
        offset: u32,
        data: &[u8]
    ) -> Result<(), ()>; fn block_read<'a>(
        &mut self,
        block: u32,
        offset: u32,
        data: &'a mut [u8]
    ) -> Result<&'a mut [u8], ()>; fn block_close(
        &mut self,
        block: u32,
        name: &str,
        len: u32,
        kind: BlockKind
    ) -> Result<(), ()>; unsafe fn block_load_to(
        &mut self,
        block: u32,
        dest: *mut u8,
        max_len: usize
    ) -> Result<(*const u8, usize), ()>; }

Required Methods

Implementors