pub enum ScoreboardComparison {
Equal,
NotEqual,
Greater,
GreaterOrEqual,
Less,
LessOrEqual,
}
Expand description
Any comparison that can be executed on two scoreboard values
Variants§
Implementations§
source§impl ScoreboardComparison
impl ScoreboardComparison
sourcepub fn flip_sides(&self) -> ScoreboardComparison
pub fn flip_sides(&self) -> ScoreboardComparison
Flips the comparison (converts OP such that a OP b == b OP.flip_sides() a
)
sourcepub fn invert(&self) -> ScoreboardComparison
pub fn invert(&self) -> ScoreboardComparison
Inverts the comparison, such that it is exactly and only then true when the original comparison is false
pub fn evaluate(&self, lhs: i32, rhs: i32) -> bool
pub fn str_value(&self) -> &'static str
Trait Implementations§
source§impl Clone for ScoreboardComparison
impl Clone for ScoreboardComparison
source§fn clone(&self) -> ScoreboardComparison
fn clone(&self) -> ScoreboardComparison
Returns a copy of the value. Read more
1.0.0 · 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 ScoreboardComparison
impl Debug for ScoreboardComparison
source§impl PartialEq for ScoreboardComparison
impl PartialEq for ScoreboardComparison
source§fn eq(&self, other: &ScoreboardComparison) -> bool
fn eq(&self, other: &ScoreboardComparison) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ScoreboardComparison
impl Eq for ScoreboardComparison
impl StructuralEq for ScoreboardComparison
impl StructuralPartialEq for ScoreboardComparison
Auto Trait Implementations§
impl RefUnwindSafe for ScoreboardComparison
impl Send for ScoreboardComparison
impl Sync for ScoreboardComparison
impl Unpin for ScoreboardComparison
impl UnwindSafe for ScoreboardComparison
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.