pub fn write_bytes<T: LabelConverter>(&self, w: &mut Vec<u8>, converter: &T) {
        assert!(self.opcode.is_some()); // Cannot fail from user input. If this assert trips, it means the assembler has a bug somewhere.

        w.push(self.opcode.unwrap() as u8);

        // Write all instructions to the stream & gather byte count.
        let cur_size = &[&self.operand_1, &self.operand_2, &self.operand_3]
            .iter()
            .map(|op| Instruction::write_operand(*op, w, converter))
            .sum::<usize>();
        debug_assert_eq!(self.opcode.as_ref().unwrap().width() - 1, *cur_size as u16);
    }
/// Represent the instruction as a sequence of bytes.
Represent the instruction as a sequence of bytes.
Represent the instruction as a sequence of bytes .
pub fn write_bytes<T: LabelConverter>(&self, w: &mut Vec<u8>, converter: &T) {
        assert!(self.opcode.is_some()); // Cannot fail from user input. If this assert trips, it means the assembler has a bug somewhere.
        w.push(self.opcode.unwrap() as u8);
        // Write all instructions to the stream & gather byte count.
        let cur_size = &[&self.operand_1, &self.operand_2, &self.operand_3]
            .iter()
            .map(|op| Instruction::write_operand(*op, w, converter))
            .sum::<usize>();
        debug_assert_eq!(self.opcode.as_ref().unwrap().width() - 1, *cur_size as u16);
    }
pub fn write_bytes < T : LabelConverter > ( & self , w : & mut Vec < u8 > , converter : & T ) { assert ! ( self opcode is_some ( ) ) ; // Cannot fail from user input. If this assert trips, it means the assembler has a bug somewhere. w . push ( self . opcode . unwrap ( ) as u8 ) ; // Write all instructions to the stream & gather byte count. let cur_size = & [ & self . operand_1 , & self . operand_2 , & self . operand_3 ] . iter ( ) . map ( | op | Instruction :: write_operand ( * op , w , converter ) ) . sum :: < usize > ( ) ; debug_assert_eq ! ( self opcode as_ref ( ) unwrap ( ) width ( ) 1 cur_size as u16 ) ; }
Represent the instruction as a sequence of bytes.
Represent the instruction as a sequence of bytes .
&self
w
&mut Vec<u8>
converter
&T
&self
w
&mut Vec<u8>
converter
&T