[][src]Struct balena_temen::ast::Expression

pub struct Expression {
    pub value: ExpressionValue,
    pub negated: bool,
    pub filters: Vec<FunctionCall>,
}

An expression

Fields

value: ExpressionValue

An expression value

negated: bool

Is expression negated?

filters: Vec<FunctionCall>

List of filters to apply

Methods

impl Expression[src]

pub fn new(value: ExpressionValue) -> Expression[src]

Creates new expression

Expression is not negated and no filters are applied.

Arguments

  • value - An expression value

pub fn new_negated(value: ExpressionValue) -> Expression[src]

Creates new negated expression

Expression is negated and no filters are applied.

Arguments

  • value - An expression value

pub fn new_with_filters(
    value: ExpressionValue,
    filters: Vec<FunctionCall>
) -> Expression
[src]

Creates new expression

Expression is not negated and filters are applied.

Arguments

  • value - An expression value
  • filters - List of filters to apply

pub fn into_negated(self) -> Expression[src]

Converts self into negated expression

pub fn identifier(&self) -> Option<&Identifier>[src]

Returns identifier from an expression value

pub fn into_identifier(self) -> Result<Identifier>[src]

Converts self into Identifier

Trait Implementations

impl PartialEq<Expression> for Expression[src]

impl Clone for Expression[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Expression[src]

impl FromStr for Expression[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for Expression

impl Sync for Expression

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.