pub struct ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>where
Sc: Score,{ /* private fields */ }Expand description
Zero-erasure existence stream: a left operator, a right operator, and the
named key adapters between them. named() builds the count-backed
ExistenceNode and its generic terminal.
Implementations§
Source§impl<S, A, K, L, R, LK, RK, Sc> ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>
impl<S, A, K, L, R, LK, RK, Sc> ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>
Sourcepub fn penalize<W>(
self,
weight: W,
) -> ExistsConstraintBuilder<S, A, K, L, R, LK, RK, impl for<'a> Fn(&S, &Leaf<'a, A>) -> Sc + Send + Sync, Sc>
pub fn penalize<W>( self, weight: W, ) -> ExistsConstraintBuilder<S, A, K, L, R, LK, RK, impl for<'a> Fn(&S, &Leaf<'a, A>) -> Sc + Send + Sync, Sc>
Penalizes each match by weight.
weight is a fixed score, or a closure over the matched entity returning one.
A fixed weight with a non-zero hard level marks the constraint hard; closures
are soft unless wrapped in hard_weight.
Sourcepub fn reward<W>(
self,
weight: W,
) -> ExistsConstraintBuilder<S, A, K, L, R, LK, RK, impl for<'a> Fn(&S, &Leaf<'a, A>) -> Sc + Send + Sync, Sc>
pub fn reward<W>( self, weight: W, ) -> ExistsConstraintBuilder<S, A, K, L, R, LK, RK, impl for<'a> Fn(&S, &Leaf<'a, A>) -> Sc + Send + Sync, Sc>
Rewards each match by weight.
weight is a fixed score, or a closure over the matched entity returning one.
A fixed weight with a non-zero hard level marks the constraint hard; closures
are soft unless wrapped in hard_weight.
Trait Implementations§
Auto Trait Implementations§
impl<S, A, K, L, R, LK, RK, Sc> Forget for ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>
impl<S, A, K, L, R, LK, RK, Sc> Freeze for ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>
impl<S, A, K, L, R, LK, RK, Sc> RefUnwindSafe for ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>where
L: RefUnwindSafe,
R: RefUnwindSafe,
LK: RefUnwindSafe,
RK: RefUnwindSafe,
PhantomData<(fn() -> S, fn() -> A, fn() -> K, fn() -> Sc)>: RefUnwindSafe,
impl<S, A, K, L, R, LK, RK, Sc> Send for ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>
impl<S, A, K, L, R, LK, RK, Sc> Sync for ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>
impl<S, A, K, L, R, LK, RK, Sc> Unpin for ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>
impl<S, A, K, L, R, LK, RK, Sc> UnsafeUnpin for ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>where
L: UnsafeUnpin,
R: UnsafeUnpin,
LK: UnsafeUnpin,
RK: UnsafeUnpin,
PhantomData<(fn() -> S, fn() -> A, fn() -> K, fn() -> Sc)>: UnsafeUnpin,
impl<S, A, K, L, R, LK, RK, Sc> UnwindSafe for ExistsConstraintStream<S, A, K, L, R, LK, RK, Sc>where
L: UnwindSafe,
R: UnwindSafe,
LK: UnwindSafe,
RK: UnwindSafe,
PhantomData<(fn() -> S, fn() -> A, fn() -> K, fn() -> Sc)>: 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