Skip to main content

ExistsConstraintStream

Struct ExistsConstraintStream 

Source
pub struct ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>
where Sc: Score,
{ /* private fields */ }

Implementations§

Source§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc> ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>
where S: Send + Sync + 'static, A: Clone + Send + Sync + 'static, P: Clone + Send + Sync + 'static, B: Clone + Send + Sync + 'static, K: Eq + Hash + Clone + Send + Sync, EA: TrackedCollectionExtract<S, Item = A>, EP: TrackedCollectionExtract<S, Item = P>, KA: Fn(&A) -> K + Send + Sync, KB: Fn(&B) -> K + Send + Sync, FA: UniFilter<S, A>, FP: UniFilter<S, P>, Flatten: FlattenExtract<P, Item = B>, Sc: Score + 'static,

Source

pub fn new( mode: ExistenceMode, extractor_a: EA, extractor_parent: EP, keys: (KA, KB), filter_a: FA, filter_parent: FP, flatten: Flatten, ) -> Self

Source

pub fn penalize( self, weight: Sc, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, impl Fn(&A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn penalize_with<W>( self, weight_fn: W, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, W, Sc>
where W: Fn(&A) -> Sc + Send + Sync,

Source

pub fn penalize_hard_with<W>( self, weight_fn: W, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, W, Sc>
where W: Fn(&A) -> Sc + Send + Sync,

Source

pub fn penalize_hard( self, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, impl Fn(&A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn penalize_soft( self, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, impl Fn(&A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn reward( self, weight: Sc, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, impl Fn(&A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn reward_with<W>( self, weight_fn: W, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, W, Sc>
where W: Fn(&A) -> Sc + Send + Sync,

Source

pub fn reward_hard_with<W>( self, weight_fn: W, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, W, Sc>
where W: Fn(&A) -> Sc + Send + Sync,

Source

pub fn reward_hard( self, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, impl Fn(&A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Source

pub fn reward_soft( self, ) -> ExistsConstraintBuilder<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, impl Fn(&A) -> Sc + Send + Sync, Sc>
where Sc: Copy,

Trait Implementations§

Source§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc: Score> Debug for ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc> Freeze for ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>
where EA: Freeze, EP: Freeze, KA: Freeze, KB: Freeze, FA: Freeze, FP: Freeze, Flatten: Freeze,

§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc> RefUnwindSafe for ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>

§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc> Send for ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>
where EA: Send, EP: Send, KA: Send, KB: Send, FA: Send, FP: Send, Flatten: Send,

§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc> Sync for ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>
where EA: Sync, EP: Sync, KA: Sync, KB: Sync, FA: Sync, FP: Sync, Flatten: Sync,

§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc> Unpin for ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>
where EA: Unpin, EP: Unpin, KA: Unpin, KB: Unpin, FA: Unpin, FP: Unpin, Flatten: Unpin,

§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc> UnsafeUnpin for ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>
where EA: UnsafeUnpin, EP: UnsafeUnpin, KA: UnsafeUnpin, KB: UnsafeUnpin, FA: UnsafeUnpin, FP: UnsafeUnpin, Flatten: UnsafeUnpin,

§

impl<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc> UnwindSafe for ExistsConstraintStream<S, A, P, B, K, EA, EP, KA, KB, FA, FP, Flatten, Sc>
where EA: UnwindSafe, EP: UnwindSafe, KA: UnwindSafe, KB: UnwindSafe, FA: UnwindSafe, FP: UnwindSafe, Flatten: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.