Struct cambridge_asm::exec::Memory
source · [−]#[repr(transparent)]pub struct Memory(_);
Expand description
Struct providing random-access memory (RAM)
Implementations
sourceimpl Memory
impl Memory
pub fn new(mem: BTreeMap<usize, MemEntry>) -> Self
pub fn iter(&self) -> Iter<'_, usize, MemEntry>
pub fn get(&self, addr: &usize) -> Result<usize, PasmError>
pub fn get_address(&self, addr: &usize) -> PasmResult<usize>
pub fn write(&mut self, addr: &usize, dat: usize) -> PasmResult
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Memory
impl<'de> Deserialize<'de> for Memory
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
Blanket Implementations
sourceimpl<'de, T> BorrowDecode<'de> for T where
T: Decode,
impl<'de, T> BorrowDecode<'de> for T where
T: Decode,
sourcefn borrow_decode<D>(decoder: &mut D) -> Result<T, DecodeError> where
D: Decoder,
fn borrow_decode<D>(decoder: &mut D) -> Result<T, DecodeError> where
D: Decoder,
Attempt to decode this type with the given BorrowDecode.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more