[−][src]Struct emulator::bus::Ram
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]
&mut self,
first_address: u8,
last_address: u8,
overlay_bus: &'a dyn Bus
)
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]
fn read(&self, address: u8) -> Result<u8>
[src]
fn write(&self, address: u8, value: u8) -> Result<()>
[src]
impl<'a> Default for Ram<'a>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,