pub struct MemoryBlockStore { /* private fields */ }Expand description
Simple in-memory block store for testing and development.
Implementations§
Trait Implementations§
Source§impl BlockStore for MemoryBlockStore
impl BlockStore for MemoryBlockStore
Source§fn block_size(&self) -> usize
fn block_size(&self) -> usize
Block size in bytes.
Source§fn total_blocks(&self) -> u64
fn total_blocks(&self) -> u64
Total number of blocks in the store.
Source§fn read_block(&self, block_id: u64) -> FsResult<Vec<u8>>
fn read_block(&self, block_id: u64) -> FsResult<Vec<u8>>
Read a full block. Returns exactly
block_size() bytes.Source§fn write_block(&self, block_id: u64, data: &[u8]) -> FsResult<()>
fn write_block(&self, block_id: u64, data: &[u8]) -> FsResult<()>
Write a full block.
data must be exactly block_size() bytes.Auto Trait Implementations§
impl !Freeze for MemoryBlockStore
impl RefUnwindSafe for MemoryBlockStore
impl Send for MemoryBlockStore
impl Sync for MemoryBlockStore
impl Unpin for MemoryBlockStore
impl UnsafeUnpin for MemoryBlockStore
impl UnwindSafe for MemoryBlockStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more