pub struct ConstraintPoster<'solver, ConstraintImpl> { /* private fields */ }Expand description
A structure which is responsible for adding the created Constraints to the
Solver. For an example on how to use this, see crate::constraints.
Implementations§
source§impl<'a, ConstraintImpl> ConstraintPoster<'a, ConstraintImpl>
impl<'a, ConstraintImpl> ConstraintPoster<'a, ConstraintImpl>
source§impl<ConstraintImpl: Constraint> ConstraintPoster<'_, ConstraintImpl>
impl<ConstraintImpl: Constraint> ConstraintPoster<'_, ConstraintImpl>
sourcepub fn post(self) -> Result<(), ConstraintOperationError>
pub fn post(self) -> Result<(), ConstraintOperationError>
Add the Constraint to the Solver.
This method returns a ConstraintOperationError if the addition of the Constraint led
to a root-level conflict.
sourcepub fn implied_by(
self,
reification_literal: Literal,
) -> Result<(), ConstraintOperationError>
pub fn implied_by( self, reification_literal: Literal, ) -> Result<(), ConstraintOperationError>
Add the half-reified version of the Constraint to the Solver; i.e. post the
constraint r -> constraint where r is a reification literal.
This method returns a ConstraintOperationError if the addition of the Constraint led
to a root-level conflict.
source§impl<ConstraintImpl: NegatableConstraint> ConstraintPoster<'_, ConstraintImpl>
impl<ConstraintImpl: NegatableConstraint> ConstraintPoster<'_, ConstraintImpl>
sourcepub fn reify(
self,
reification_literal: Literal,
) -> Result<(), ConstraintOperationError>
pub fn reify( self, reification_literal: Literal, ) -> Result<(), ConstraintOperationError>
Add the reified version of the Constraint to the Solver; i.e. post the constraint
r <-> constraint where r is a reification literal.
This method returns a ConstraintOperationError if the addition of the Constraint led
to a root-level conflict.
Trait Implementations§
source§impl<'solver, ConstraintImpl: Debug> Debug for ConstraintPoster<'solver, ConstraintImpl>
impl<'solver, ConstraintImpl: Debug> Debug for ConstraintPoster<'solver, ConstraintImpl>
Auto Trait Implementations§
impl<'solver, ConstraintImpl> Freeze for ConstraintPoster<'solver, ConstraintImpl>where
ConstraintImpl: Freeze,
impl<'solver, ConstraintImpl> !RefUnwindSafe for ConstraintPoster<'solver, ConstraintImpl>
impl<'solver, ConstraintImpl> !Send for ConstraintPoster<'solver, ConstraintImpl>
impl<'solver, ConstraintImpl> !Sync for ConstraintPoster<'solver, ConstraintImpl>
impl<'solver, ConstraintImpl> Unpin for ConstraintPoster<'solver, ConstraintImpl>where
ConstraintImpl: Unpin,
impl<'solver, ConstraintImpl> !UnwindSafe for ConstraintPoster<'solver, ConstraintImpl>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more