asmkit-rs 0.3.1

Portable assembler toolkit: decoding and encoding of various architectures
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Formatter core functionality

/// An output for formatter.
pub trait FormatterOutput {
    fn write_str(&mut self, s: &str);
    fn write_fmt(&mut self, args: core::fmt::Arguments<'_>);
}

impl FormatterOutput for alloc::string::String {
    fn write_str(&mut self, s: &str) {
        self.push_str(s);
    }

    fn write_fmt(&mut self, args: core::fmt::Arguments<'_>) {
        core::fmt::write(self, args).unwrap();
    }
}