pub struct DistinctValuesEvaluatorBuilder<R, W> { /* private fields */ }Expand description
Builder for DistinctValuesEvaluator.
Implementations§
Source§impl<W, R> DistinctValuesEvaluatorBuilder<R, W>
impl<W, R> DistinctValuesEvaluatorBuilder<R, W>
Source§impl<W> DistinctValuesEvaluatorBuilder<NoValue, W>
impl<W> DistinctValuesEvaluatorBuilder<NoValue, W>
Sourcepub fn min_required(
self,
min_required: usize,
) -> DistinctValuesEvaluatorBuilder<Value<usize>, W>
pub fn min_required( self, min_required: usize, ) -> DistinctValuesEvaluatorBuilder<Value<usize>, W>
Set the minimum number of distinct values required to award the achievement.
Source§impl<R> DistinctValuesEvaluatorBuilder<R, NoValue>
impl<R> DistinctValuesEvaluatorBuilder<R, NoValue>
Sourcepub fn max_window(
self,
max_window: Duration,
) -> DistinctValuesEvaluatorBuilder<R, Value<Duration>>
pub fn max_window( self, max_window: Duration, ) -> DistinctValuesEvaluatorBuilder<R, Value<Duration>>
Set the maximum time window in which the bloops must have occurred.
Source§impl DistinctValuesEvaluatorBuilder<Value<usize>, Value<Duration>>
impl DistinctValuesEvaluatorBuilder<Value<usize>, Value<Duration>>
Sourcepub fn build<Player, State, Trigger, V, E>(
self,
extract: E,
) -> impl Evaluator<Player, State, Trigger> + Debug
pub fn build<Player, State, Trigger, V, E>( self, extract: E, ) -> impl Evaluator<Player, State, Trigger> + Debug
Build the evaluator.
Sourcepub fn build_with_derived_ctx<Player, State, Trigger, V, C, DC, E>(
self,
derive_ctx: DC,
extract: E,
) -> impl Evaluator<Player, State, Trigger> + Debugwhere
DC: for<'a> Fn(&'a AchievementContext<'_, Player, State, Trigger>) -> DerivedCtx<'a, C> + Send + Sync + 'static,
E: for<'a> Fn(&'a Player, &'a C) -> ExtractResult<V> + Send + Sync + 'static,
V: Eq + Hash + 'static,
pub fn build_with_derived_ctx<Player, State, Trigger, V, C, DC, E>(
self,
derive_ctx: DC,
extract: E,
) -> impl Evaluator<Player, State, Trigger> + Debugwhere
DC: for<'a> Fn(&'a AchievementContext<'_, Player, State, Trigger>) -> DerivedCtx<'a, C> + Send + Sync + 'static,
E: for<'a> Fn(&'a Player, &'a C) -> ExtractResult<V> + Send + Sync + 'static,
V: Eq + Hash + 'static,
Build the evaluator with additionally derived context.
The derived context can be used to initially retrieve values from the achievement context and have them available in the extractor.
Trait Implementations§
Auto Trait Implementations§
impl<R, W> Freeze for DistinctValuesEvaluatorBuilder<R, W>
impl<R, W> RefUnwindSafe for DistinctValuesEvaluatorBuilder<R, W>where
R: RefUnwindSafe,
W: RefUnwindSafe,
impl<R, W> Send for DistinctValuesEvaluatorBuilder<R, W>
impl<R, W> Sync for DistinctValuesEvaluatorBuilder<R, W>
impl<R, W> Unpin for DistinctValuesEvaluatorBuilder<R, W>
impl<R, W> UnsafeUnpin for DistinctValuesEvaluatorBuilder<R, W>where
R: UnsafeUnpin,
W: UnsafeUnpin,
impl<R, W> UnwindSafe for DistinctValuesEvaluatorBuilder<R, W>where
R: UnwindSafe,
W: 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
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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