Struct icu_plurals::rules::ast::Relation [−][src]
pub struct Relation { pub expression: Expression, pub operator: Operator, pub range_list: RangeList, }
An incomplete AST representation of a plural rule. Comprises an Expression
, an Operator
, and a RangeList
.
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()
function.
"i = 3"
Can be represented by the AST:
use icu::plurals::rules::ast::*; Relation { expression: Expression { operand: Operand::I, modulus: None, }, operator: Operator::Eq, range_list: RangeList(Box::new([RangeListItem::Value(Value(3))])), };
Fields
expression: Expression
operator: Operator
range_list: RangeList
Trait Implementations
impl StructuralPartialEq for Relation
[src]
impl StructuralPartialEq for Relation
[src]Auto Trait Implementations
impl RefUnwindSafe for Relation
impl RefUnwindSafe for Relation
impl UnwindSafe for Relation
impl UnwindSafe for Relation