pub trait Print: Sized {
fn fmt_dimacs(&self, out: &mut Formatter<'_>) -> Result;
fn pp_dimacs(&self) -> PrintWrapper<'_, Self> { ... }
}
Expand description
Objects that can be printed in DIMACS syntax
Required Methods
fn fmt_dimacs(&self, out: &mut Formatter<'_>) -> Result
Provided Methods
sourcefn pp_dimacs(&self) -> PrintWrapper<'_, Self>
fn pp_dimacs(&self) -> PrintWrapper<'_, Self>
Any type implementing T
can be used in a format string by
just using x.pp_dimacs()
instead of x
.
use batsat::*;
let v: Vec<Lit> = vec![];
format!("as dimacs: {}", v.pp_dimacs());
Implementors
impl<T: ClauseIterable> Print for T
Any iterable clause can be printed in DIMACS