Struct rtlola_parser::ast::Expression
source · pub struct Expression {
pub kind: ExpressionKind,
pub id: NodeId,
pub span: Span,
}
Expand description
The Ast representation of a stream expression
Fields§
§kind: ExpressionKind
The kind of the root expression, e.g., stream access
id: NodeId
The id of the node in the Ast
span: Span
The span in the specification declaring the extend declaration
Implementations§
source§impl Expression
impl Expression
sourcepub fn parse_discrete_duration(&self) -> Result<u64, String>
pub fn parse_discrete_duration(&self) -> Result<u64, String>
Parses an expression into a duration for a discrete window ExpressionKind::DiscreteWindowAggregation
sourcepub fn parse_frequency(&self) -> Result<UOM_Frequency, String>
pub fn parse_frequency(&self) -> Result<UOM_Frequency, String>
Parses an expression into a frequency. Expression must be a positive numeric value with Hz unit.
sourcepub fn parse_freqspec(&self) -> Result<UOM_Frequency, String>
pub fn parse_freqspec(&self) -> Result<UOM_Frequency, String>
Parses a frequency annotation. Expression must either be a frequency or a duration representing the period
Trait Implementations§
source§impl Clone for Expression
impl Clone for Expression
source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a copy 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 Expression
impl Debug for Expression
source§impl Display for Expression
impl Display for Expression
source§impl Hash for Expression
impl Hash for Expression
source§impl PartialEq<Expression> for Expression
impl PartialEq<Expression> for Expression
source§fn eq(&self, other: &Expression) -> bool
fn eq(&self, other: &Expression) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.