struct MemoryBlockDevice {
data: Vec<u8>,
}Expand description
In-memory block device for ISO data
Fields§
§data: Vec<u8>Implementations§
Trait Implementations§
Source§impl BlockIo for MemoryBlockDevice
impl BlockIo for MemoryBlockDevice
Source§type Error = MemoryBlockIoError
type Error = MemoryBlockIoError
IO error type.
Source§fn block_size(&self) -> BlockSize
fn block_size(&self) -> BlockSize
Get the [
BlockSize]. The return value is not allowed to
change.Source§fn num_blocks(&mut self) -> Result<u64, Self::Error>
fn num_blocks(&mut self) -> Result<u64, Self::Error>
Get the number of logical blocks in the disk. Read more
Source§fn read_blocks(
&mut self,
start_lba: Lba,
dst: &mut [u8],
) -> Result<(), Self::Error>
fn read_blocks( &mut self, start_lba: Lba, dst: &mut [u8], ) -> Result<(), Self::Error>
Read contiguous blocks from the disk. The
dst buffer size must
be a multiple of block_size. Implementations are permitted
to panic if this precondition is not met, e.g. by calling
[BlockSize::assert_valid_block_buffer].Source§fn write_blocks(
&mut self,
_start_lba: Lba,
_src: &[u8],
) -> Result<(), Self::Error>
fn write_blocks( &mut self, _start_lba: Lba, _src: &[u8], ) -> Result<(), Self::Error>
Write contiguous block to the disk. The
src buffer size must
be a multiple of block_size. Implementations are permitted
to panic if this precondition is not met, e.g. by calling
[BlockSize::assert_valid_block_buffer]. Read moreAuto Trait Implementations§
impl Freeze for MemoryBlockDevice
impl RefUnwindSafe for MemoryBlockDevice
impl Send for MemoryBlockDevice
impl Sync for MemoryBlockDevice
impl Unpin for MemoryBlockDevice
impl UnwindSafe for MemoryBlockDevice
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