You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
627 B
Rust

use std::path::PathBuf;
4 years ago
use super::Section;
use crate::error::Error;
4 years ago
pub trait Output<'data> {
fn append_section(&mut self, section: Section<'data>) -> Result<(), Error>;
4 years ago
// fn prepare_symbol<V, S>(&mut self, symbol: impl Lazy<V, S>) -> Result<&mut Self, Error>;
fn finalize(self) -> Result<PathBuf, Error>;
4 years ago
}
pub struct DummyOutput;
impl<'data> Output<'data> for DummyOutput {
fn append_section(&mut self, section: Section<'data>) -> Result<(), Error> {
4 years ago
eprintln!("Appending section: {}", section);
Ok(())
}
fn finalize(self) -> Result<PathBuf, Error> {
todo!();
}
}