Struct lc3_ensemble::sim::mem::RegFile
source · pub struct RegFile(/* private fields */);Expand description
The register file.
This struct can be indexed with a Reg
(which can be constructed using the crate::ast::reg_consts module or via Reg::try_from).
§Example
use lc3_ensemble::sim::mem::RegFile;
use lc3_ensemble::ast::reg_consts::R0;
let mut reg = RegFile::new(&mut ()); // never should have to initialize a reg file
reg[R0].set(11);
assert_eq!(reg[R0].get(), 11);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RegFile
impl RefUnwindSafe for RegFile
impl Send for RegFile
impl Sync for RegFile
impl Unpin for RegFile
impl UnwindSafe for RegFile
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)