Trait Output

Source
pub trait Output {
    type Error;

    // Required methods
    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>;
}
Expand description

The output where the CNF information is piped to.

Usually implemented by a dependency of this crate.

Required Associated Types§

Source

type Error

An error that can occure with the parser output.

Required Methods§

Source

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.

Source

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

A literal has been read.

Source

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

The end of the current clause has been read.

Source

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.

Implementors§