Struct cldr_pluralrules_parser::ast::AndCondition
source · Expand description
An incomplete AST representation of a plural rule. Comprises a vector of Relations.
Examples
All AST nodes can be built explicitly, as seen in the example. However, due to its complexity, it is preferred to build the AST using the parse_plural_rule function.
"i = 3 and v = 0"
Can be represented by the AST:
use cldr_pluralrules_parser::ast::*;
AndCondition(vec![
Relation {
expression: Expression {
operand: Operand('i'),
modulus: None,
},
operator: Operator::In,
range_list: RangeList(vec![RangeListItem::Value(Value(5))]),
},
Relation {
expression: Expression {
operand: Operand('v'),
modulus: None,
},
operator: Operator::NotIn,
range_list: RangeList(vec![RangeListItem::Value(Value(2))]),
},
]);
Tuple Fields
0: Vec<Relation>
Trait Implementations
sourceimpl Clone for AndCondition
impl Clone for AndCondition
sourcefn clone(&self) -> AndCondition
fn clone(&self) -> AndCondition
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AndCondition
impl Debug for AndCondition
sourceimpl PartialEq<AndCondition> for AndCondition
impl PartialEq<AndCondition> for AndCondition
sourcefn eq(&self, other: &AndCondition) -> bool
fn eq(&self, other: &AndCondition) -> bool
impl StructuralPartialEq for AndCondition
Auto Trait Implementations
impl RefUnwindSafe for AndCondition
impl Send for AndCondition
impl Sync for AndCondition
impl Unpin for AndCondition
impl UnwindSafe for AndCondition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more