[][src]Enum nu_protocol::hir::Expression

pub enum Expression {
    Literal(Literal),
    ExternalWord,
    Synthetic(Synthetic),
    Variable(StringSpan),
    Binary(Box<Binary>),
    Range(Box<Range>),
    Block(Block),
    List(Vec<SpannedExpression>),
    Table(Vec<SpannedExpression>, Vec<Vec<SpannedExpression>>),
    Path(Box<Path>),
    FilePath(PathBuf),
    ExternalCommand(ExternalStringCommand),
    Command,
    Invocation(Block),
    Boolean(bool),
    Garbage,
}

Variants

Literal(Literal)
ExternalWord
Synthetic(Synthetic)
Variable(StringSpan)
Binary(Box<Binary>)
Range(Box<Range>)
Block(Block)
Path(Box<Path>)
FilePath(PathBuf)
ExternalCommand(ExternalStringCommand)
Command
Invocation(Block)
Boolean(bool)
Garbage

Implementations

impl Expression[src]

pub fn integer(i: BigInt) -> Expression[src]

pub fn decimal(dec: BigDecimal) -> Expression[src]

pub fn string(s: String) -> Expression[src]

pub fn operator(operator: Operator) -> Expression[src]

pub fn range(
    left: Option<SpannedExpression>,
    operator: Spanned<RangeOperator>,
    right: Option<SpannedExpression>
) -> Expression
[src]

pub fn pattern(p: String) -> Expression[src]

pub fn file_path(file_path: PathBuf) -> Expression[src]

pub fn simple_column_path(members: Vec<Member>) -> Expression[src]

pub fn path(
    head: SpannedExpression,
    tail: Vec<impl Into<PathMember>>
) -> Expression
[src]

pub fn unit(i: Spanned<i64>, unit: Spanned<Unit>) -> Expression[src]

pub fn variable(v: String, span: Span) -> Expression[src]

pub fn boolean(b: bool) -> Expression[src]

pub fn has_it_usage(&self) -> bool[src]

Trait Implementations

impl Clone for Expression[src]

impl Debug for Expression[src]

impl<'de> Deserialize<'de> for Expression[src]

impl Eq for Expression[src]

impl Hash for Expression[src]

impl IntoSpanned for Expression[src]

type Output = SpannedExpression

impl Ord for Expression[src]

impl PartialEq<Expression> for Expression[src]

impl PartialOrd<Expression> for Expression[src]

impl Serialize for Expression[src]

impl ShellTypeName for Expression[src]

impl StructuralEq for Expression[src]

impl StructuralPartialEq for Expression[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSpanned for T where
    T: HasFallibleSpan
[src]

type Output = T

impl<T> SpannedItem for T[src]

impl<T> TaggedItem for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.