diff --git a/src/expr.rs b/src/expr.rs index d050761..b39c5e5 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -14,7 +14,7 @@ pub enum Expression { Boolean(bool), /// List expressions are constructed by plain arrays containing of an arbitrary number of expressions. List(Cow<'static, [Expression]>), - BinaryOperation(BinaryOperation), + BinaryOperation(Box), Range(Range), Named(NamedExpression), @@ -327,23 +327,23 @@ pub enum FibFlag { pub enum BinaryOperation { #[serde(rename = "&")] /// Binary AND (`&`) - AND(Box, Box), + AND(Expression, Expression), #[serde(rename = "|")] /// Binary OR (`|`) - OR(Box, Box), + OR(Expression, Expression), #[serde(rename = "^")] /// Binary XOR (`^`) - XOR(Box, Box), + XOR(Expression, Expression), #[serde(rename = "<<")] /// Left shift (`<<`) - LSHIFT(Box, Box), + LSHIFT(Expression, Expression), #[serde(rename = ">>")] /// Right shift (`>>`) - RSHIFT(Box, Box), + RSHIFT(Expression, Expression), } #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] diff --git a/src/schema.rs b/src/schema.rs index 0d96d8e..91d4724 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -140,9 +140,9 @@ pub enum FlushObject { /// A chain to flush (i.e., remove all rules from chain). Chain(Chain), /// A set to flush (i.e., remove all elements from set). - Set(Set), + Set(Box), /// A map to flush (i.e., remove all elements from map). - Map(Map), + Map(Box), /// A meter to flush. Meter(Meter), /// Flush the live ruleset (i.e., remove all elements from live ruleset). @@ -774,7 +774,7 @@ pub enum LimitUnit { pub struct Meter { pub name: Cow<'static, str>, pub key: Expression, - pub stmt: Statement, + pub stmt: Box, } #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]