use crate::{error, path::Path, streamer::Output};
pub mod analyser;
pub mod buffer;
pub mod file;
pub mod indexer;
pub mod println;
pub mod replace;
pub mod shorten;
pub mod unstringify;
pub use analyser::Analyser;
pub use buffer::Buffer;
pub use file::File;
pub use indexer::Indexer;
pub use println::PrintLn;
pub use replace::Replace;
pub use shorten::Shorten;
pub use unstringify::Unstringify;
pub trait Handler: Send {
fn handle(
&mut self,
path: &Path,
matcher_idx: usize,
data: Option<&[u8]>,
) -> Result<Option<Vec<u8>>, error::Handler>;
fn handle_idx(
&mut self,
_path: &Path,
_matcher_idx: usize,
_idx: Output,
) -> Result<(), error::Handler> {
Ok(())
}
fn use_path(&self) -> bool {
false
}
fn separator(&self) -> &str {
"\n"
}
fn buffering_required(&self) -> bool {
true
}
}