Struct mem::std_impls::MemVector
[−]
[src]
pub struct MemVector { /* fields omitted */ }
Simple Vec
-based memory block.
Should suffice basic RAM needs.
Trait Implementations
impl MemoryCreator<MemVector> for MemVector
[src]
fn new(size: Addr) -> MemVector
[src]
Returns a MemoryBlock
of size size
. size
being the highest address, NOT number of addresses. Read more
impl MemoryBlock for MemVector
[src]
fn get_size(&self) -> Addr
[src]
Get the block's accessible size. Simply the highest address, NOT the number of addresses. Read more
fn get(&self, addr: Addr) -> Result<Byte, Error>
[src]
Get a byte at address. Returns Ok(X)
on success, where X will be the byte. Read more
fn set(&mut self, addr: Addr, byte: Byte) -> Result<(), Error>
[src]
Set a byte at address.
fn delete(&mut self, from: Addr, to: Addr) -> Result<(), Error>
[src]
Delete data at address. May allow the block to efficiently delete it, marking it as unused. This could allow the block to do wear leveling, for example. Read more
fn flush(&mut self) -> Result<(), Error>
[src]
Flush writes out. In case it does any form of caching, calling this method ensures it has written all the data it needs to write. Or, well, it fails otherwise. Read more
impl MemoryBlock32be for MemVector
[src]
fn set32be(&mut self, addr: Addr, data: u32) -> Result<(), Error>
[src]
Set a 32 bit value (4 bytes) in Big Endian format.
fn get32be(&self, addr: Addr) -> Result<u32, Error>
[src]
Get a 32 bit value (4 bytes) stored in Big Endian format.