RAMMachine

Trait RAMMachine 

Source
pub trait RAMMachine<K, V> {
    // Required methods
    fn new(config_arugments: ConfigArgs<K>) -> Self;
    fn write(&mut self, address: K, value: V) -> Result<(), Error>;
    fn read(&mut self, address: K) -> Result<V, Error>;
}
Expand description

Random Access Memory Machine

Required Methods§

Source

fn new(config_arugments: ConfigArgs<K>) -> Self

Create a new instance of RAM machine

Source

fn write(&mut self, address: K, value: V) -> Result<(), Error>

Write a value to a memory address

Source

fn read(&mut self, address: K) -> Result<V, Error>

Read a value from a memory address

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<K, V, const S: usize> RAMMachine<K, V> for StateMachine<K, V, S>
where K: Base<S>, V: Base<S>,

Implementation of RAMMachine for StateMachine