Enum rurtle::parse::ast::CompOp
[−]
[src]
pub enum CompOp { Equal, Less, Greater, LessEqual, GreaterEqual, NotEqual, }
Different comparison operators
Variants
Equal | |
Less | |
Greater | |
LessEqual | |
GreaterEqual | |
NotEqual |
Methods
impl CompOp
fn matches(&self, ord: &Ordering) -> bool
Returns true if CompOp self includes the given Ordering, that is the CompOp should return true if it compares two elements with the given Ordering
use std::cmp::Ordering; assert_eq!(CompOp::Equal.matches(&Ordering::Equal), true); assert_eq!(CompOp::Greater.matches(&Ordering::Less), false);