pub trait DynamicFile<const BLOCK_SIZE: usize = 512>: Sync + Send {
    fn len(&self) -> usize;
    fn read_chunk(&self, chunk_index: usize, buff: &mut [u8]) -> usize;
    fn write_chunk(&mut self, chunk_index: usize, data: &[u8]) -> usize;
}
Expand description

ReadWrite trait for generic file objects

Required Methods

Return the maximum length of the virtual file in bytes

Read a chunk of the virtual file, returning the read length

Write a chunk of the virtual file, returning the write length

Implementors