use std::fmt::Debug;
use std::io::Result;
pub trait FotBuilder: Debug {
fn entity(&mut self, system_id: &str, content: &str) -> Result<()>;
fn formatting_instruction(&mut self, data: &str) -> Result<()>;
fn directory(&mut self, path: &str) -> Result<()>;
fn current_output(&self) -> &str;
fn clear_buffer(&mut self);
fn current_directory(&self) -> Option<&str> {
None
}
fn set_current_directory(&mut self, _path: Option<String>) {
}
fn start_sequence(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"sequence flow object not supported by this backend",
))
}
fn end_sequence(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"sequence flow object not supported by this backend",
))
}
fn start_paragraph(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"paragraph flow object not supported by this backend",
))
}
fn end_paragraph(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"paragraph flow object not supported by this backend",
))
}
fn literal(&mut self, _text: &str) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"literal not supported by this backend",
))
}
fn start_display_group(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"display-group flow object not supported by this backend",
))
}
fn end_display_group(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"display-group flow object not supported by this backend",
))
}
fn start_simple_page_sequence(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"simple-page-sequence flow object not supported by this backend",
))
}
fn end_simple_page_sequence(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"simple-page-sequence flow object not supported by this backend",
))
}
fn start_line_field(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"line-field flow object not supported by this backend",
))
}
fn end_line_field(&mut self) -> Result<()> {
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"line-field flow object not supported by this backend",
))
}
}
#[cfg(test)]
mod tests {
#[test]
fn test_trait_defined() {
}
}