Struct clingo::ProgramBuilder
[−]
[src]
pub struct ProgramBuilder<'a> { /* fields omitted */ }
Object to build non-ground programs.
Methods
impl<'a> ProgramBuilder<'a>
[src]
pub fn add<T>(&mut self, stm: &AstStatement<T>) -> Result<(), ClingoError>
[src]
Adds a statement to the program.
Attention: The end()
must be called after
all statements have been added.
Arguments
statement
- the statement to add
Errors
ErrorType::Runtime
for statements of invalid formErrorType::BadAlloc
pub fn end(self) -> Option<()>
[src]
End building a program. The method consumes the program builder.