InstructionDecoder

Trait InstructionDecoder 

Source
pub trait InstructionDecoder<'a> {
    type InstructionType;

    // Required method
    fn decode_instruction(
        &self,
        instruction: &'a Instruction,
    ) -> Option<DecodedInstruction<Self::InstructionType>>;
}
Expand description

Decodes a raw Instruction into a typed representation.

Implement this for each program you wish to support. A decoder should return Some(DecodedInstruction<..>) only when it recognizes the instruction format for its program, otherwise return None.

Required Associated Types§

Required Methods§

Implementors§