pub trait ListingExt {
    fn add_code<S: AsRef<str> + Display>(
        &mut self,
        code: S
    ) -> Result<(), AssemblerError>; fn to_bytes_with_options(
        &self,
        option: &AssemblingOptions
    ) -> Result<Vec<u8>, AssemblerError>; fn estimated_duration(&self) -> Result<usize, AssemblerError>; fn to_string(&self) -> String; fn to_enhanced_string(&self) -> String; fn inject_labels(&mut self, labels: &[(u16, &str)]); fn to_bytes(&self) -> Result<Vec<u8>, AssemblerError> { ... } fn number_of_bytes(&self) -> Result<usize, AssemblerError> { ... } fn save<P: AsRef<Path>>(&self, path: P) -> Result<()> { ... } }
Expand description

Additional methods for the listings

Required Methods

Get the execution duration. If field duration is set, returns it. Otherwise, compute it

Generate a string that contains also the bytes panic even for simple corner cases

Modify the listing to inject labels at the given addresses

Provided Methods

Assemble the listing (without context) and returns the bytes

Compute the size of the listing. The listing has a size only if its tokens has a size

Save the listing on disc in a string version

Implementors