[][src]Struct emulator::bus::Ram

pub struct Ram<'a> { /* fields omitted */ }

Ram of the 2i.

Represents the 8 bit ram of the 2i.

Methods

impl<'a> Ram<'a>[src]

pub fn new() -> Ram<'a>[src]

Create a new ram with all addresses initialised to zero.

pub fn inspect(&self) -> &RefCell<[u8; 256]>[src]

Direct access to the ram wrapped in a RefCell.

pub fn add_overlay(
    &mut self,
    first_address: u8,
    last_address: u8,
    overlay_bus: &'a dyn Bus
)
[src]

Add a bus as an overlay to the ram.

When a read or write lies in the given (inclusive) range, the request is forwarded to the given bus. All overlays are checked in the order they were added.

Trait Implementations

impl<'a> Bus for Ram<'a>[src]

impl<'a> Default for Ram<'a>[src]

Auto Trait Implementations

impl<'a> !Send for Ram<'a>

impl<'a> !Sync for Ram<'a>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.