Enum nu_protocol::hir::Expression
source · [−]pub enum Expression {
Show 16 variants
Literal(Literal),
ExternalWord,
Synthetic(Synthetic),
Variable(String, Span),
Binary(Box<Binary>),
Range(Box<Range>),
Block(Arc<Block>),
List(Vec<SpannedExpression>),
Table(Vec<SpannedExpression>, Vec<Vec<SpannedExpression>>),
FullColumnPath(Box<FullColumnPath>),
FilePath(PathBuf),
ExternalCommand(ExternalStringCommand),
Command,
Subexpression(Arc<Block>),
Boolean(bool),
Garbage,
}
Variants
Literal(Literal)
ExternalWord
Synthetic(Synthetic)
Variable(String, Span)
Binary(Box<Binary>)
Range(Box<Range>)
Block(Arc<Block>)
List(Vec<SpannedExpression>)
Table(Vec<SpannedExpression>, Vec<Vec<SpannedExpression>>)
FullColumnPath(Box<FullColumnPath>)
FilePath(PathBuf)
ExternalCommand(ExternalStringCommand)
Command
Subexpression(Arc<Block>)
Boolean(bool)
Garbage
Implementations
sourceimpl Expression
impl Expression
pub fn integer(i: i64) -> Expression
pub fn big_integer(i: BigInt) -> Expression
pub fn decimal(dec: BigDecimal) -> Expression
pub fn string(s: String) -> Expression
pub fn operator(operator: Operator) -> Expression
pub fn range(
left: Option<SpannedExpression>,
operator: Spanned<RangeOperator>,
right: Option<SpannedExpression>
) -> Expression
pub fn glob_pattern(p: String) -> Expression
pub fn file_path(file_path: PathBuf) -> Expression
pub fn simple_column_path(members: Vec<Member>) -> Expression
pub fn path(
head: SpannedExpression,
tail: Vec<impl Into<PathMember>>
) -> Expression
pub fn unit(i: Spanned<i64>, unit: Spanned<Unit>) -> Expression
pub fn variable(v: String, span: Span) -> Expression
pub fn boolean(b: bool) -> Expression
pub fn has_var_usage(&self, var_name: &str) -> bool
pub fn get_free_variables(
&self,
known_variables: &mut Vec<String>
) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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<'de> Deserialize<'de> for Expression
impl<'de> Deserialize<'de> for Expression
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
sourceimpl Hash for Expression
impl Hash for Expression
sourceimpl IntoSpanned for Expression
impl IntoSpanned for Expression
type Output = SpannedExpression
fn into_spanned(self, span: impl Into<Span>) -> Self::Output
sourceimpl Ord for Expression
impl Ord 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 !=
.
sourceimpl PartialOrd<Expression> for Expression
impl PartialOrd<Expression> for Expression
sourcefn partial_cmp(&self, other: &Expression) -> Option<Ordering>
fn partial_cmp(&self, other: &Expression) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl Serialize for Expression
impl Serialize for Expression
sourceimpl ShellTypeName for Expression
impl ShellTypeName for Expression
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> SpannedItem for T
impl<T> SpannedItem for T
sourceimpl<T> TaggedItem for T
impl<T> TaggedItem for T
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more