pub struct FakeCard {
pub fill: u8,
pub grounds_cd: bool,
pub reads: Vec<(u32, i64)>,
pub writes: Vec<(u32, u8, i64)>,
pub resets: Vec<ResetKind>,
/* private fields */
}Expand description
A card claiming arbitrary page ranges; every access is recorded.
Fields§
§fill: u8§grounds_cd: bool§reads: Vec<(u32, i64)>§writes: Vec<(u32, u8, i64)>§resets: Vec<ResetKind>Implementations§
Trait Implementations§
Source§impl Card for FakeCard
impl Card for FakeCard
Source§fn grounds_cd(&self) -> bool
fn grounds_cd(&self) -> bool
The /CD line: a card grounds it so a CD unit can tell one is inserted.
[doc: wiki HuCard pinout]
Source§fn claims(&self) -> Vec<(usize, usize)>
fn claims(&self) -> Vec<(usize, usize)>
Inclusive (first_page, last_page) ranges over the 8192 pages of 256 bytes.
fn reset(&mut self, kind: ResetKind, _pins: &mut BoardPins<'_>)
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
For an add-on that knows which card it built (the CD unit and its System Card).
Source§impl DeviceState for FakeCard
impl DeviceState for FakeCard
Source§fn load_state(&mut self, data: &[u8]) -> Result<(), String>
fn load_state(&mut self, data: &[u8]) -> Result<(), String>
Put the device in a saved state. A device without state accepts only an empty one.
Source§fn state_identity(&self) -> String
fn state_identity(&self) -> String
What the device is and which media it holds (a card’s ROM by its SHA-1, a disc by its
table of contents): a state is refused by a system whose device answers otherwise.
Auto Trait Implementations§
impl Freeze for FakeCard
impl RefUnwindSafe for FakeCard
impl Send for FakeCard
impl Sync for FakeCard
impl Unpin for FakeCard
impl UnwindSafe for FakeCard
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