Struct prql_compiler::internals::Node  
source · [−]pub struct Node {
    pub item: Item,
    pub span: Option<Span>,
    pub declared_at: Option<usize>,
    pub ty: Ty,
    pub is_complex: bool,
}Fields
item: Itemspan: Option<Span>declared_at: Option<usize>ty: Tyis_complex: boolIs true when containing window functions
Implementations
sourceimpl Node
 
impl Node
pub fn new_ident<S: ToString>(name: S, declared_at: usize) -> Node
sourcepub fn discard_name(self) -> Result<Node, Error>
 
pub fn discard_name(self) -> Result<Node, Error>
Return an error if this is a named expression.
pub fn into_name_and_expr(self) -> (Option<String>, Node)
sourcepub fn coerce_to_vec(self) -> Vec<Node>
 
pub fn coerce_to_vec(self) -> Vec<Node>
Often we don’t care whether a List or single item is passed; e.g.
select x vs select [x, y]. This equalizes them both to a vec of
Node-s.
pub fn coerce_to_pipeline(self) -> Pipeline
pub fn unwrap<T, F>(self, f: F, expected: &str) -> Result<T, Error> where
    F: FnOnce(Item) -> Result<T, Item>, 
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Node
 
impl<'de> Deserialize<'de> for Node
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Node
Auto Trait Implementations
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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