use entity::LabelRef;
pub mod entity;
#[derive(Clone, Debug, PartialEq)]
pub struct Product {
bytes: Vec<u8>,
}
impl Product {
pub fn new(bytes: Vec<u8>) -> Self {
Self { bytes }
}
pub fn emit(self) -> Vec<u8> {
self.bytes
}
}
pub trait InstructionStream {
fn create_label(&mut self) -> LabelRef;
fn create_label_attached(&mut self) -> LabelRef;
fn attach_label(&mut self, label: LabelRef);
fn write_byte(&mut self, byte: u8);
fn write_word(&mut self, word: u16);
fn write_double_word(&mut self, word: u32);
fn write_quad_word(&mut self, word: u64);
fn write_double_quad_word(&mut self, word: u128);
fn finish(self) -> Product;
}