[][src]Trait cnf_parser::Output

pub trait Output {
    type Error;
    fn problem(
        &mut self,
        num_variables: u32,
        num_clauses: u32
    ) -> Result<(), Self::Error>;
fn literal(&mut self, literal: Literal) -> Result<(), Self::Error>;
fn finalize_clause(&mut self) -> Result<(), Self::Error>;
fn finish(&mut self) -> Result<(), Self::Error>; }

The output where the CNF information is piped to.

Usually implemented by a dependency of this crate.

Associated Types

type Error

An error that can occure with the parser output.

Loading content...

Required methods

fn problem(
    &mut self,
    num_variables: u32,
    num_clauses: u32
) -> Result<(), Self::Error>

The optional problem line with the number of total variables and clauses.

Note

This will only be processed once per CNF input stream.

fn literal(&mut self, literal: Literal) -> Result<(), Self::Error>

A literal has been read.

fn finalize_clause(&mut self) -> Result<(), Self::Error>

The end of the current clause has been read.

fn finish(&mut self) -> Result<(), Self::Error>

Called at the end of CNF parsing.

Outputs can expect to receive no more messages from the parser after being called with finish.

Loading content...

Implementors

Loading content...