pub struct Panel {
pub block_hits: Vec<u32>,
pub cell_hits: Vec<u32>,
pub running: bool,
pub pc: u16,
pub cell: u16,
pub sp: u16,
pub hp: u16,
pub cycles: u32,
}Expand description
What one frame of the activity panel shows: the engine’s state at the frame’s snapshot, and the engine clocks each block and each cell ran in the frame before it.
Fields§
§block_hits: Vec<u32>One count per engine block (WPE_HW_MAXBLK).
cell_hits: Vec<u32>One count per program cell (WPE_HW_MAXCELL).
running: bool§pc: u16§cell: u16§sp: u16§hp: u16§cycles: u32Implementations§
Source§impl Panel
impl Panel
Sourcepub fn pixel(&self, font: &[u8], x: usize, y: usize) -> Option<u16>
pub fn pixel(&self, font: &[u8], x: usize, y: usize) -> Option<u16>
The panel’s colour at screen pixel (x, y), or None where the text shows through. Inside its regions:
- the cycle count: ten digit glyphs from the font,
PANEL_DIGITon black, leading zeros black, the units digit always drawn; - a block tile or cell square: black but for an inner box two pixels in, painted with the
HEATcolour of its count, and the box’s one-pixel borderPANEL_OUTLINEwhen the engine is running in it; - a stack segment: eight pixels wide, a 6 × 10 box one pixel in from the left and three down, lit
(
PANEL_STACK_LIT) for each frame belowsp, elsePANEL_GAUGE_UNLIT; - a heap column: one pixel wide, eight tall from four down, lit (
PANEL_HEAP_LIT) belowhp.
Trait Implementations§
impl Eq for Panel
impl StructuralPartialEq for Panel
Auto Trait Implementations§
impl Freeze for Panel
impl RefUnwindSafe for Panel
impl Send for Panel
impl Sync for Panel
impl Unpin for Panel
impl UnsafeUnpin for Panel
impl UnwindSafe for Panel
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.