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
sourceimpl 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
sourceimpl Clone for Expression
impl Clone for Expression
sourcefn clone(&self) -> Expression
fn clone(&self) -> Expression
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 more
sourceimpl Debug for Expression
impl Debug for Expression
sourceimpl Display for Expression
impl Display for Expression
sourceimpl Hash for Expression
impl Hash for Expression
sourceimpl PartialEq<Expression> for Expression
impl PartialEq<Expression> for Expression
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &Expression) -> bool
fn ne(&self, other: &Expression) -> bool
This method tests for !=
.
impl Eq for Expression
impl StructuralEq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more