Struct prql_compiler::ast::pl::expr::Expr

source ·
pub struct Expr {
    pub id: Option<usize>,
    pub kind: ExprKind,
    pub span: Option<Span>,
    pub target_id: Option<usize>,
    pub target_ids: Vec<usize>,
    pub ty: Option<Ty>,
    pub needs_window: bool,
    pub alias: Option<String>,
}
Expand description

Expr is anything that has a value and thus a type. If it cannot contain nested Exprs, is should be under ExprKind::Literal.

Fields§

§id: Option<usize>

Unique identificator of the node. Set exactly once during semantic::resolve.

§kind: ExprKind§span: Option<Span>§target_id: Option<usize>

For Idents, this is id of node referenced by the ident

§target_ids: Vec<usize>

For ExprKind::All, these are ids of included nodes

§ty: Option<Ty>

Type of expression this node represents. None means type has not yet been determined.

§needs_window: bool§alias: Option<String>

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
The number of items that this chain link consists of.
Append the elements in this link to the chain.
An iterator over the items within this container, by value.
Iterate over the elements of the container (using internal iteration because GATs are unstable).
Give this value the specified foreground colour
Give this value the specified background colour

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.