pub struct Memory(/* private fields */);Expand description
Memory for temporary storage of words.
Implementations§
source§impl Memory
impl Memory
sourcepub const SIZE_LIMIT: usize = 10_240usize
pub const SIZE_LIMIT: usize = 10_240usize
The maximum number of words that can be stored in memory.
sourcepub fn alloc(&mut self, size: i64) -> Result<(), OpError>
pub fn alloc(&mut self, size: i64) -> Result<(), OpError>
Allocate more memory to the end of this memory.
sourcepub fn store(&mut self, address: i64, value: i64) -> Result<(), OpError>
pub fn store(&mut self, address: i64, value: i64) -> Result<(), OpError>
Store a word at the given address.
Trait Implementations§
impl StructuralPartialEq for Memory
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more