pub struct BinaryExpr {
pub op: TokenType,
pub lhs: Box<Expr>,
pub rhs: Box<Expr>,
pub modifier: Option<BinModifier>,
}
Expand description
Grammar:
<vector expr> <bin-op> ignoring(<label list>) group_left(<label list>) <vector expr>
<vector expr> <bin-op> ignoring(<label list>) group_right(<label list>) <vector expr>
<vector expr> <bin-op> on(<label list>) group_left(<label list>) <vector expr>
<vector expr> <bin-op> on(<label list>) group_right(<label list>) <vector expr>
Fields§
§op: TokenType
The operation of the expression.
lhs: Box<Expr>
The operands on the left sides of the operator.
rhs: Box<Expr>
The operands on the right sides of the operator.
modifier: Option<BinModifier>
Implementations§
Source§impl BinaryExpr
impl BinaryExpr
pub fn is_matching_on(&self) -> bool
pub fn is_matching_labels_not_empty(&self) -> bool
pub fn return_bool(&self) -> bool
Sourcepub fn is_labels_joint(&self) -> bool
pub fn is_labels_joint(&self) -> bool
check if labels of card and matching are joint
Sourcepub fn intersect_labels(&self) -> Option<Vec<String>>
pub fn intersect_labels(&self) -> Option<Vec<String>>
intersect labels of card and matching
Trait Implementations§
Source§impl Clone for BinaryExpr
impl Clone for BinaryExpr
Source§fn clone(&self) -> BinaryExpr
fn clone(&self) -> BinaryExpr
Returns a duplicate 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 BinaryExpr
impl Debug for BinaryExpr
Source§impl Display for BinaryExpr
impl Display for BinaryExpr
Source§impl PartialEq for BinaryExpr
impl PartialEq for BinaryExpr
Source§impl Prettier for BinaryExpr
impl Prettier for BinaryExpr
Source§fn format(&self, level: usize, max: usize) -> String
fn format(&self, level: usize, max: usize) -> String
override format if expr needs to be split into multiple lines
Source§fn pretty(&self, level: usize, max: usize) -> String
fn pretty(&self, level: usize, max: usize) -> String
max param is short for max_characters_per_line.
Source§fn needs_split(&self, max: usize) -> bool
fn needs_split(&self, max: usize) -> bool
override needs_split to return false, in order not to split multiple lines
impl Eq for BinaryExpr
impl StructuralPartialEq for BinaryExpr
Auto Trait Implementations§
impl Freeze for BinaryExpr
impl !RefUnwindSafe for BinaryExpr
impl Send for BinaryExpr
impl Sync for BinaryExpr
impl Unpin for BinaryExpr
impl !UnwindSafe for BinaryExpr
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.