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<ConstraintImpl: Constraint> ConstraintPoster<'_, ConstraintImpl>
impl<ConstraintImpl: Constraint> ConstraintPoster<'_, ConstraintImpl>
Sourcepub fn post(self)
pub fn post(self)
Add the Constraint to the Solver.
Sourcepub fn implied_by(self, reification_literal: Literal)
pub fn implied_by(self, reification_literal: Literal)
Add the half-reified version of the Constraint to the Solver; i.e. post the
constraint r -> constraint where r is a reification literal.
Source§impl<ConstraintImpl: NegatableConstraint> ConstraintPoster<'_, ConstraintImpl>
impl<ConstraintImpl: NegatableConstraint> ConstraintPoster<'_, ConstraintImpl>
Sourcepub fn reify(self, reification_literal: Literal)
pub fn reify(self, reification_literal: Literal)
Add the reified version of the Constraint to the Solver; i.e. post the constraint
r <-> constraint where r is a reification literal.
Trait Implementations§
Source§impl<'solver, ConstraintImpl: Debug> Debug for ConstraintPoster<'solver, ConstraintImpl>
impl<'solver, ConstraintImpl: Debug> Debug for ConstraintPoster<'solver, ConstraintImpl>
Source§impl<ConstraintImpl> Drop for ConstraintPoster<'_, ConstraintImpl>
impl<ConstraintImpl> Drop for ConstraintPoster<'_, ConstraintImpl>
Auto Trait Implementations§
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> !UnwindSafe for ConstraintPoster<'solver, ConstraintImpl>
impl<'solver, ConstraintImpl> Freeze for ConstraintPoster<'solver, ConstraintImpl>where
ConstraintImpl: Freeze,
impl<'solver, ConstraintImpl> Unpin for ConstraintPoster<'solver, ConstraintImpl>where
ConstraintImpl: Unpin,
impl<'solver, ConstraintImpl> UnsafeUnpin for ConstraintPoster<'solver, ConstraintImpl>where
ConstraintImpl: UnsafeUnpin,
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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>
Converts
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>
Converts
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