pub struct Part { /* private fields */ }
Expand description
Struct used to specify the program parts that have to be grounded.
Programs may be structured into parts, which can be grounded independently with Control::ground()
.
Program parts are mainly interesting for incremental grounding and multi-shot solving.
For single-shot solving, program parts are not needed.
Note: Parts of a logic program without an explicit #program
specification are by default put into a program called base
- without
arguments.
See: Control::ground()
Implementations§
source§impl Part
impl Part
sourcepub fn new(name: &str, params: Vec<Symbol>) -> Result<Part, ClingoError>
pub fn new(name: &str, params: Vec<Symbol>) -> Result<Part, ClingoError>
Create a new program part object.
Arguments
name
- the identifier of the programparams
- the parameter of the program
Errors
ClingoError::NulError
- ifname
contains a nul byteClingoError::InternalError
withErrorCode::BadAlloc
orErrorCode::Runtime
if argument parsing fails
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Part
impl !Send for Part
impl !Sync for Part
impl Unpin for Part
impl UnwindSafe for Part
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more