Skip to main content

Expression

Enum Expression 

Source
pub enum Expression {
Show 39 variants Array(Array), AsType(AsType), Ascription(Ascription), AsyncBlock(AsyncBlock), Binary(Binary), Block(Box<Block>), Box(ExpressionBox), Break(Break), Byte(Byte), ByteString(ByteString), Call(Call), Character(Character), Closure(Closure), Continue(Continue), Dereference(Dereference), Disambiguation(Disambiguation), FieldAccess(FieldAccess), ForLoop(ForLoop), If(If), IfLet(IfLet), Let(Let), Loop(Loop), MacroCall(MacroCall), Match(Match), Number(Number), Parenthetical(Parenthetical), Range(Range), RangeInclusive(RangeInclusive), Reference(Reference), Return(Return), Slice(Slice), String(String), Tuple(Tuple), TryOperator(TryOperator), Unary(Unary), UnsafeBlock(UnsafeBlock), Value(Value), While(While), WhileLet(WhileLet),
}

Variants§

§

Array(Array)

§

AsType(AsType)

§

Ascription(Ascription)

§

AsyncBlock(AsyncBlock)

§

Binary(Binary)

§

Block(Box<Block>)

§

Box(ExpressionBox)

§

Break(Break)

§

Byte(Byte)

§

ByteString(ByteString)

§

Call(Call)

§

Character(Character)

§

Closure(Closure)

§

Continue(Continue)

§

Dereference(Dereference)

§

Disambiguation(Disambiguation)

§

FieldAccess(FieldAccess)

§

ForLoop(ForLoop)

§

If(If)

§

IfLet(IfLet)

§

Let(Let)

§

Loop(Loop)

§

MacroCall(MacroCall)

§

Match(Match)

§

Number(Number)

§

Parenthetical(Parenthetical)

§

Range(Range)

§

RangeInclusive(RangeInclusive)

§

Reference(Reference)

§

Return(Return)

§

Slice(Slice)

§

String(String)

§

Tuple(Tuple)

§

TryOperator(TryOperator)

§

Unary(Unary)

§

UnsafeBlock(UnsafeBlock)

§

Value(Value)

§

While(While)

§

WhileLet(WhileLet)

Implementations§

Source§

impl Expression

Source

pub fn into_array(self) -> Option<Array>

Source

pub fn into_as_type(self) -> Option<AsType>

Source

pub fn into_ascription(self) -> Option<Ascription>

Source

pub fn into_async_block(self) -> Option<AsyncBlock>

Source

pub fn into_binary(self) -> Option<Binary>

Source

pub fn into_block(self) -> Option<Box<Block>>

Source

pub fn into_box(self) -> Option<ExpressionBox>

Source

pub fn into_break(self) -> Option<Break>

Source

pub fn into_byte(self) -> Option<Byte>

Source

pub fn into_byte_string(self) -> Option<ByteString>

Source

pub fn into_call(self) -> Option<Call>

Source

pub fn into_character(self) -> Option<Character>

Source

pub fn into_closure(self) -> Option<Closure>

Source

pub fn into_continue(self) -> Option<Continue>

Source

pub fn into_dereference(self) -> Option<Dereference>

Source

pub fn into_disambiguation(self) -> Option<Disambiguation>

Source

pub fn into_field_access(self) -> Option<FieldAccess>

Source

pub fn into_for_loop(self) -> Option<ForLoop>

Source

pub fn into_if(self) -> Option<If>

Source

pub fn into_if_let(self) -> Option<IfLet>

Source

pub fn into_let(self) -> Option<Let>

Source

pub fn into_loop(self) -> Option<Loop>

Source

pub fn into_macro_call(self) -> Option<MacroCall>

Source

pub fn into_match(self) -> Option<Match>

Source

pub fn into_number(self) -> Option<Number>

Source

pub fn into_parenthetical(self) -> Option<Parenthetical>

Source

pub fn into_range(self) -> Option<Range>

Source

pub fn into_range_inclusive(self) -> Option<RangeInclusive>

Source

pub fn into_reference(self) -> Option<Reference>

Source

pub fn into_return(self) -> Option<Return>

Source

pub fn into_slice(self) -> Option<Slice>

Source

pub fn into_string(self) -> Option<String>

Source

pub fn into_tuple(self) -> Option<Tuple>

Source

pub fn into_try_operator(self) -> Option<TryOperator>

Source

pub fn into_unary(self) -> Option<Unary>

Source

pub fn into_unsafe_block(self) -> Option<UnsafeBlock>

Source

pub fn into_value(self) -> Option<Value>

Source

pub fn into_while(self) -> Option<While>

Source

pub fn into_while_let(self) -> Option<WhileLet>

Source

pub fn as_array(&self) -> Option<&Array>

Source

pub fn as_as_type(&self) -> Option<&AsType>

Source

pub fn as_ascription(&self) -> Option<&Ascription>

Source

pub fn as_async_block(&self) -> Option<&AsyncBlock>

Source

pub fn as_binary(&self) -> Option<&Binary>

Source

pub fn as_block(&self) -> Option<&Box<Block>>

Source

pub fn as_box(&self) -> Option<&ExpressionBox>

Source

pub fn as_break(&self) -> Option<&Break>

Source

pub fn as_byte(&self) -> Option<&Byte>

Source

pub fn as_byte_string(&self) -> Option<&ByteString>

Source

pub fn as_call(&self) -> Option<&Call>

Source

pub fn as_character(&self) -> Option<&Character>

Source

pub fn as_closure(&self) -> Option<&Closure>

Source

pub fn as_continue(&self) -> Option<&Continue>

Source

pub fn as_dereference(&self) -> Option<&Dereference>

Source

pub fn as_disambiguation(&self) -> Option<&Disambiguation>

Source

pub fn as_field_access(&self) -> Option<&FieldAccess>

Source

pub fn as_for_loop(&self) -> Option<&ForLoop>

Source

pub fn as_if(&self) -> Option<&If>

Source

pub fn as_if_let(&self) -> Option<&IfLet>

Source

pub fn as_let(&self) -> Option<&Let>

Source

pub fn as_loop(&self) -> Option<&Loop>

Source

pub fn as_macro_call(&self) -> Option<&MacroCall>

Source

pub fn as_match(&self) -> Option<&Match>

Source

pub fn as_number(&self) -> Option<&Number>

Source

pub fn as_parenthetical(&self) -> Option<&Parenthetical>

Source

pub fn as_range(&self) -> Option<&Range>

Source

pub fn as_range_inclusive(&self) -> Option<&RangeInclusive>

Source

pub fn as_reference(&self) -> Option<&Reference>

Source

pub fn as_return(&self) -> Option<&Return>

Source

pub fn as_slice(&self) -> Option<&Slice>

Source

pub fn as_string(&self) -> Option<&String>

Source

pub fn as_tuple(&self) -> Option<&Tuple>

Source

pub fn as_try_operator(&self) -> Option<&TryOperator>

Source

pub fn as_unary(&self) -> Option<&Unary>

Source

pub fn as_unsafe_block(&self) -> Option<&UnsafeBlock>

Source

pub fn as_value(&self) -> Option<&Value>

Source

pub fn as_while(&self) -> Option<&While>

Source

pub fn as_while_let(&self) -> Option<&WhileLet>

Source

pub fn is_array(&self) -> bool

Source

pub fn is_as_type(&self) -> bool

Source

pub fn is_ascription(&self) -> bool

Source

pub fn is_async_block(&self) -> bool

Source

pub fn is_binary(&self) -> bool

Source

pub fn is_block(&self) -> bool

Source

pub fn is_box(&self) -> bool

Source

pub fn is_break(&self) -> bool

Source

pub fn is_byte(&self) -> bool

Source

pub fn is_byte_string(&self) -> bool

Source

pub fn is_call(&self) -> bool

Source

pub fn is_character(&self) -> bool

Source

pub fn is_closure(&self) -> bool

Source

pub fn is_continue(&self) -> bool

Source

pub fn is_dereference(&self) -> bool

Source

pub fn is_disambiguation(&self) -> bool

Source

pub fn is_field_access(&self) -> bool

Source

pub fn is_for_loop(&self) -> bool

Source

pub fn is_if(&self) -> bool

Source

pub fn is_if_let(&self) -> bool

Source

pub fn is_let(&self) -> bool

Source

pub fn is_loop(&self) -> bool

Source

pub fn is_macro_call(&self) -> bool

Source

pub fn is_match(&self) -> bool

Source

pub fn is_number(&self) -> bool

Source

pub fn is_parenthetical(&self) -> bool

Source

pub fn is_range(&self) -> bool

Source

pub fn is_range_inclusive(&self) -> bool

Source

pub fn is_reference(&self) -> bool

Source

pub fn is_return(&self) -> bool

Source

pub fn is_slice(&self) -> bool

Source

pub fn is_string(&self) -> bool

Source

pub fn is_tuple(&self) -> bool

Source

pub fn is_try_operator(&self) -> bool

Source

pub fn is_unary(&self) -> bool

Source

pub fn is_unsafe_block(&self) -> bool

Source

pub fn is_value(&self) -> bool

Source

pub fn is_while(&self) -> bool

Source

pub fn is_while_let(&self) -> bool

Trait Implementations§

Source§

impl Debug for Expression

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Expression> for Attributed<Expression>

Source§

fn from(value: Expression) -> Attributed<Expression>

Converts to this type from the input type.
Source§

impl HasExtent for Expression

Source§

fn extent(&self) -> Extent

Source§

impl<'a> Index<&'a Expression> for str

Source§

type Output = str

The returned type after indexing.
Source§

fn index(&self, i: &'a Expression) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<Expression> for str

Source§

type Output = str

The returned type after indexing.
Source§

fn index(&self, i: Expression) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Visit for Expression

Source§

fn visit<'ast, V>(&'ast self, v: &mut V)
where V: Visitor<'ast>,

Source§

fn visit_mut<V>(&mut self, v: &mut V)
where V: VisitorMut,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.