[][src]Trait emul8::internals::opcode::Opcode

pub trait Opcode: Debug + Display + Downcast {
    fn execute(&self, processor: &mut Processor);

    fn modified_pc(&self) -> bool { ... }
fn assemble(&self) -> (u8, u8) { ... } }

Required methods

fn execute(&self, processor: &mut Processor)

Loading content...

Provided methods

fn modified_pc(&self) -> bool

fn assemble(&self) -> (u8, u8)

Loading content...

Methods

impl dyn Opcode

pub fn is<__T: Opcode>(&self) -> bool

Returns true if the trait object wraps an object of type __T.

pub fn downcast<__T: Opcode>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn't.

pub fn downcast_rc<__T: Opcode>(self: Rc<Self>) -> Result<Rc<__T>, Rc<Self>>

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn't.

pub fn downcast_ref<__T: Opcode>(&self) -> Option<&__T>

Returns a reference to the object within the trait object if it is of type __T, or None if it isn't.

pub fn downcast_mut<__T: Opcode>(&mut self) -> Option<&mut __T>

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn't.

Implementors

impl Opcode for ADDIVx[src]

impl Opcode for ADDVxByte[src]

impl Opcode for ADDVxVy[src]

impl Opcode for ANDVxVy[src]

impl Opcode for CALL[src]

impl Opcode for CLS[src]

impl Opcode for DRW[src]

impl Opcode for InvalidOpcode[src]

impl Opcode for JMP[src]

impl Opcode for JPV0Offset[src]

impl Opcode for LDBVx[src]

impl Opcode for LDDTVx[src]

impl Opcode for LDFVx[src]

impl Opcode for LDIAddr[src]

impl Opcode for LDIVx[src]

impl Opcode for LDSTVx[src]

impl Opcode for LDVxByte[src]

impl Opcode for LDVxDT[src]

impl Opcode for LDVxI[src]

impl Opcode for LDVxK[src]

impl Opcode for LDVxVy[src]

impl Opcode for ORVxVy[src]

impl Opcode for RET[src]

impl Opcode for RNDVxByte[src]

impl Opcode for SEVxByte[src]

impl Opcode for SEVxVy[src]

impl Opcode for SHLVxVy[src]

impl Opcode for SHRVxVy[src]

impl Opcode for SKNPBRDVx[src]

impl Opcode for SKPKBRDVx[src]

impl Opcode for SNEVxByte[src]

impl Opcode for SNEVxVy[src]

impl Opcode for SUBNVxVy[src]

impl Opcode for SUBVxVy[src]

impl Opcode for XORVxVy[src]

Loading content...