use super::Section; use crate::error::Error; pub trait Output { fn allocate(&mut self, size: u64) -> Result; fn append_section(&mut self, section: &Section) -> Result<(), Error>; // fn prepare_symbol(&mut self, symbol: impl Lazy) -> Result<&mut Self, Error>; } pub struct DummyOutput; impl Output for DummyOutput { fn allocate(&mut self, size: u64) -> Result { eprintln!("Allocating: {}", size); Ok(size) } fn append_section(&mut self, section: &Section) -> Result<(), Error> { eprintln!("Appending section: {}", section); Ok(()) } }