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 duplicate 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 Ord for Expression
impl Ord for Expression
Source§fn cmp(&self, other: &Expression) -> Ordering
fn cmp(&self, other: &Expression) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Expression
impl PartialEq for Expression
Source§impl PartialOrd for Expression
impl PartialOrd for Expression
impl Eq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl !Send for Expression
impl !Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more