rust_texas/traits.rs
1use crate::prelude::*;
2pub trait AsLatex {
3 fn to_string(&self) -> String;
4}
5
6pub trait Populate {
7 /// Weird return type for chaining attaches.
8 fn attach(&mut self, other: Component) -> TexResult<&mut Self>;
9 fn attach_vec(&mut self, other: Vec<Component>) -> TexResult<&mut Self>;
10 fn attach_iter<I: Iterator<Item = Component>>(&mut self, other: I) -> TexResult<&mut Self>;
11}
12
13pub trait Opt {
14 fn add_option(&mut self, opt: &str);
15}