pub struct ExperiencePolicy { /* private fields */ }Expand description
Stable learning policy applied when assessing one action.
Implementations§
Source§impl ExperiencePolicy
impl ExperiencePolicy
Sourcepub fn new(consecutive_failure_limit: u16) -> Result<Self, ExperienceStoreError>
pub fn new(consecutive_failure_limit: u16) -> Result<Self, ExperienceStoreError>
Creates a policy that suppresses an action after this many consecutive suppression-eligible verified negatives.
Sourcepub fn consecutive_failure_limit(self) -> u16
pub fn consecutive_failure_limit(self) -> u16
Returns the consecutive suppression-eligible negative threshold.
This compatibility name is retained for the existing source and wire
contract. Prefer Self::consecutive_suppressible_failure_limit in new
integrations.
Sourcepub fn consecutive_suppressible_failure_limit(self) -> u16
pub fn consecutive_suppressible_failure_limit(self) -> u16
Returns the consecutive suppression-eligible negative threshold.
Trait Implementations§
Source§impl Clone for ExperiencePolicy
impl Clone for ExperiencePolicy
Source§fn clone(&self) -> ExperiencePolicy
fn clone(&self) -> ExperiencePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExperiencePolicy
Source§impl Debug for ExperiencePolicy
impl Debug for ExperiencePolicy
Source§impl Default for ExperiencePolicy
impl Default for ExperiencePolicy
Source§impl<'de> Deserialize<'de> for ExperiencePolicy
impl<'de> Deserialize<'de> for ExperiencePolicy
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExperiencePolicy
Source§impl PartialEq for ExperiencePolicy
impl PartialEq for ExperiencePolicy
Source§impl Serialize for ExperiencePolicy
impl Serialize for ExperiencePolicy
impl StructuralPartialEq for ExperiencePolicy
Auto Trait Implementations§
impl Freeze for ExperiencePolicy
impl RefUnwindSafe for ExperiencePolicy
impl Send for ExperiencePolicy
impl Sync for ExperiencePolicy
impl Unpin for ExperiencePolicy
impl UnsafeUnpin for ExperiencePolicy
impl UnwindSafe for ExperiencePolicy
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more