pub struct DefenseTransition { /* private fields */ }Expand description
The deterministic difference between a control and a candidate observation.
Implementations§
Source§impl DefenseTransition
impl DefenseTransition
Sourcepub fn between(control: &DefenseState, candidate: &DefenseState) -> Self
pub fn between(control: &DefenseState, candidate: &DefenseState) -> Self
Compares a control observation against a candidate observation.
The result is a pure function of the two states, so identical inputs always produce an equal transition.
Sourcepub const fn posture_shift(&self) -> PostureShift
pub const fn posture_shift(&self) -> PostureShift
Returns the direction of the posture change.
Sourcepub const fn kind(&self) -> DefenseTransitionKind
pub const fn kind(&self) -> DefenseTransitionKind
Returns the summary classification of the transition.
Sourcepub const fn is_newly_blocking(&self) -> bool
pub const fn is_newly_blocking(&self) -> bool
Returns whether the candidate is blocking while the control was not.
Sourcepub const fn is_newly_rate_limited(&self) -> bool
pub const fn is_newly_rate_limited(&self) -> bool
Returns whether the candidate is rate limited while the control was not.
Sourcepub const fn status_changed(&self) -> bool
pub const fn status_changed(&self) -> bool
Returns whether the coarse status class changed.
Sourcepub const fn fingerprint_changed(&self) -> bool
pub const fn fingerprint_changed(&self) -> bool
Returns whether the fingerprinted product changed (including appearing or disappearing).
Sourcepub const fn control_product(&self) -> Option<DefenseProduct>
pub const fn control_product(&self) -> Option<DefenseProduct>
Returns the product fingerprinted on the control leg, if any.
Sourcepub const fn candidate_product(&self) -> Option<DefenseProduct>
pub const fn candidate_product(&self) -> Option<DefenseProduct>
Returns the product fingerprinted on the candidate leg, if any.
Trait Implementations§
Source§impl Clone for DefenseTransition
impl Clone for DefenseTransition
Source§fn clone(&self) -> DefenseTransition
fn clone(&self) -> DefenseTransition
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 moreSource§impl Debug for DefenseTransition
impl Debug for DefenseTransition
impl Eq for DefenseTransition
Source§impl PartialEq for DefenseTransition
impl PartialEq for DefenseTransition
impl StructuralPartialEq for DefenseTransition
Auto Trait Implementations§
impl Freeze for DefenseTransition
impl RefUnwindSafe for DefenseTransition
impl Send for DefenseTransition
impl Sync for DefenseTransition
impl Unpin for DefenseTransition
impl UnsafeUnpin for DefenseTransition
impl UnwindSafe for DefenseTransition
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<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