pub struct Uni<S, Out, Src, F, W, Sc>where
Src: Source<S, Out>,
Sc: Score,{ /* private fields */ }Implementations§
Source§impl<S, Out, Src, F, W, Sc> Uni<S, Out, Src, F, W, Sc>
impl<S, Out, Src, F, W, Sc> Uni<S, Out, Src, F, W, Sc>
pub fn new( constraint_ref: ConstraintRef, impact_type: ImpactType, source: Src, filter: F, weight: W, is_hard: bool, ) -> Self
Trait Implementations§
Source§impl<S, Out, Src, F, W, Sc> IncrementalConstraint<S, Sc> for Uni<S, Out, Src, F, W, Sc>
impl<S, Out, Src, F, W, Sc> IncrementalConstraint<S, Sc> for Uni<S, Out, Src, F, W, Sc>
fn evaluate(&self, solution: &S) -> Sc
fn match_count(&self, solution: &S) -> usize
fn initialize(&mut self, solution: &S) -> Sc
fn on_insert( &mut self, solution: &S, entity_index: usize, descriptor_index: usize, ) -> Sc
fn on_retract( &mut self, solution: &S, entity_index: usize, descriptor_index: usize, ) -> Sc
fn reset(&mut self)
fn name(&self) -> &str
fn constraint_ref(&self) -> &ConstraintRef
fn is_hard(&self) -> bool
fn get_matches<'a>( &'a self, _solution: &S, ) -> Vec<DetailedConstraintMatch<'a, Sc>>
fn weight(&self) -> Sc
Auto Trait Implementations§
impl<S, Out, Src, F, W, Sc> Freeze for Uni<S, Out, Src, F, W, Sc>where
Src: Freeze,
F: Freeze,
W: Freeze,
Option<<Src as Source<S, Out>>::State>: Freeze,
HashMap<RowCoordinate, Sc, BuildHasherDefault<FastHasher>>: Freeze,
PhantomData<(fn() -> S, fn() -> Out)>: Freeze,
impl<S, Out, Src, F, W, Sc> RefUnwindSafe for Uni<S, Out, Src, F, W, Sc>where
Src: RefUnwindSafe,
F: RefUnwindSafe,
W: RefUnwindSafe,
Option<<Src as Source<S, Out>>::State>: RefUnwindSafe,
HashMap<RowCoordinate, Sc, BuildHasherDefault<FastHasher>>: RefUnwindSafe,
PhantomData<(fn() -> S, fn() -> Out)>: RefUnwindSafe,
impl<S, Out, Src, F, W, Sc> Send for Uni<S, Out, Src, F, W, Sc>where
F: Send,
W: Send,
Option<<Src as Source<S, Out>>::State>: Send,
HashMap<RowCoordinate, Sc, BuildHasherDefault<FastHasher>>: Send,
PhantomData<(fn() -> S, fn() -> Out)>: Send,
impl<S, Out, Src, F, W, Sc> Sync for Uni<S, Out, Src, F, W, Sc>where
F: Sync,
W: Sync,
Option<<Src as Source<S, Out>>::State>: Sync,
HashMap<RowCoordinate, Sc, BuildHasherDefault<FastHasher>>: Sync,
PhantomData<(fn() -> S, fn() -> Out)>: Sync,
impl<S, Out, Src, F, W, Sc> Unpin for Uni<S, Out, Src, F, W, Sc>where
Src: Unpin,
F: Unpin,
W: Unpin,
Option<<Src as Source<S, Out>>::State>: Unpin,
HashMap<RowCoordinate, Sc, BuildHasherDefault<FastHasher>>: Unpin,
PhantomData<(fn() -> S, fn() -> Out)>: Unpin,
impl<S, Out, Src, F, W, Sc> UnsafeUnpin for Uni<S, Out, Src, F, W, Sc>where
Src: UnsafeUnpin,
F: UnsafeUnpin,
W: UnsafeUnpin,
Option<<Src as Source<S, Out>>::State>: UnsafeUnpin,
HashMap<RowCoordinate, Sc, BuildHasherDefault<FastHasher>>: UnsafeUnpin,
PhantomData<(fn() -> S, fn() -> Out)>: UnsafeUnpin,
impl<S, Out, Src, F, W, Sc> UnwindSafe for Uni<S, Out, Src, F, W, Sc>where
Src: UnwindSafe,
F: UnwindSafe,
W: UnwindSafe,
Option<<Src as Source<S, Out>>::State>: UnwindSafe,
HashMap<RowCoordinate, Sc, BuildHasherDefault<FastHasher>>: UnwindSafe,
PhantomData<(fn() -> S, fn() -> Out)>: UnwindSafe,
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