Enum ra_ap_syntax::ast::Expr[][src]

pub enum Expr {
Show variants ArrayExpr(ArrayExpr), AwaitExpr(AwaitExpr), BinExpr(BinExpr), BlockExpr(BlockExpr), BoxExpr(BoxExpr), BreakExpr(BreakExpr), CallExpr(CallExpr), CastExpr(CastExpr), ClosureExpr(ClosureExpr), ContinueExpr(ContinueExpr), EffectExpr(EffectExpr), FieldExpr(FieldExpr), ForExpr(ForExpr), IfExpr(IfExpr), IndexExpr(IndexExpr), Literal(Literal), LoopExpr(LoopExpr), MacroCall(MacroCall), MacroStmts(MacroStmts), MatchExpr(MatchExpr), MethodCallExpr(MethodCallExpr), ParenExpr(ParenExpr), PathExpr(PathExpr), PrefixExpr(PrefixExpr), RangeExpr(RangeExpr), RecordExpr(RecordExpr), RefExpr(RefExpr), ReturnExpr(ReturnExpr), TryExpr(TryExpr), TupleExpr(TupleExpr), WhileExpr(WhileExpr), YieldExpr(YieldExpr),
}

Variants

ArrayExpr(ArrayExpr)
AwaitExpr(AwaitExpr)
BinExpr(BinExpr)
BlockExpr(BlockExpr)
BoxExpr(BoxExpr)
BreakExpr(BreakExpr)
CallExpr(CallExpr)
CastExpr(CastExpr)
ClosureExpr(ClosureExpr)
ContinueExpr(ContinueExpr)
EffectExpr(EffectExpr)
FieldExpr(FieldExpr)
ForExpr(ForExpr)
IfExpr(IfExpr)
IndexExpr(IndexExpr)
Literal(Literal)
LoopExpr(LoopExpr)
MacroCall(MacroCall)
MacroStmts(MacroStmts)
MatchExpr(MatchExpr)
MethodCallExpr(MethodCallExpr)
ParenExpr(ParenExpr)
PathExpr(PathExpr)
PrefixExpr(PrefixExpr)
RangeExpr(RangeExpr)
RecordExpr(RecordExpr)
RefExpr(RefExpr)
ReturnExpr(ReturnExpr)
TryExpr(TryExpr)
TupleExpr(TupleExpr)
WhileExpr(WhileExpr)
YieldExpr(YieldExpr)

Implementations

impl Expr[src]

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

pub fn name_ref(&self) -> Option<NameRef>[src]

impl Expr[src]

pub fn parse(text: &str) -> Result<Self, ()>[src]

Returns text, parsed as an expression, but only if it has no errors.

Trait Implementations

impl AstNode for Expr[src]

fn can_cast(kind: SyntaxKind) -> bool[src]

fn cast(syntax: SyntaxNode) -> Option<Self>[src]

fn syntax(&self) -> &SyntaxNode[src]

fn clone_for_update(&self) -> Self where
    Self: Sized
[src]

fn clone_subtree(&self) -> Self where
    Self: Sized
[src]

impl AttrsOwner for Expr[src]

fn attrs(&self) -> AstChildren<Attr>

Notable traits for AstChildren<N>

impl<N: AstNode> Iterator for AstChildren<N> type Item = N;
[src]

fn has_atom_attr(&self, atom: &str) -> bool[src]

impl Clone for Expr[src]

fn clone(&self) -> Expr[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Debug for Expr[src]

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

Formats the value using the given formatter. Read more

impl Display for Expr[src]

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

Formats the value using the given formatter. Read more

impl From<ArrayExpr> for Expr[src]

fn from(node: ArrayExpr) -> Expr[src]

Performs the conversion.

impl From<AwaitExpr> for Expr[src]

fn from(node: AwaitExpr) -> Expr[src]

Performs the conversion.

impl From<BinExpr> for Expr[src]

fn from(node: BinExpr) -> Expr[src]

Performs the conversion.

impl From<BlockExpr> for Expr[src]

fn from(node: BlockExpr) -> Expr[src]

Performs the conversion.

impl From<BoxExpr> for Expr[src]

fn from(node: BoxExpr) -> Expr[src]

Performs the conversion.

impl From<BreakExpr> for Expr[src]

fn from(node: BreakExpr) -> Expr[src]

Performs the conversion.

impl From<CallExpr> for Expr[src]

fn from(node: CallExpr) -> Expr[src]

Performs the conversion.

impl From<CastExpr> for Expr[src]

fn from(node: CastExpr) -> Expr[src]

Performs the conversion.

impl From<ClosureExpr> for Expr[src]

fn from(node: ClosureExpr) -> Expr[src]

Performs the conversion.

impl From<ContinueExpr> for Expr[src]

fn from(node: ContinueExpr) -> Expr[src]

Performs the conversion.

impl From<EffectExpr> for Expr[src]

fn from(node: EffectExpr) -> Expr[src]

Performs the conversion.

impl From<FieldExpr> for Expr[src]

fn from(node: FieldExpr) -> Expr[src]

Performs the conversion.

impl From<ForExpr> for Expr[src]

fn from(node: ForExpr) -> Expr[src]

Performs the conversion.

impl From<IfExpr> for Expr[src]

fn from(node: IfExpr) -> Expr[src]

Performs the conversion.

impl From<IndexExpr> for Expr[src]

fn from(node: IndexExpr) -> Expr[src]

Performs the conversion.

impl From<Literal> for Expr[src]

fn from(node: Literal) -> Expr[src]

Performs the conversion.

impl From<LoopExpr> for Expr[src]

fn from(node: LoopExpr) -> Expr[src]

Performs the conversion.

impl From<MacroCall> for Expr[src]

fn from(node: MacroCall) -> Expr[src]

Performs the conversion.

impl From<MacroStmts> for Expr[src]

fn from(node: MacroStmts) -> Expr[src]

Performs the conversion.

impl From<MatchExpr> for Expr[src]

fn from(node: MatchExpr) -> Expr[src]

Performs the conversion.

impl From<MethodCallExpr> for Expr[src]

fn from(node: MethodCallExpr) -> Expr[src]

Performs the conversion.

impl From<ParenExpr> for Expr[src]

fn from(node: ParenExpr) -> Expr[src]

Performs the conversion.

impl From<PathExpr> for Expr[src]

fn from(node: PathExpr) -> Expr[src]

Performs the conversion.

impl From<PrefixExpr> for Expr[src]

fn from(node: PrefixExpr) -> Expr[src]

Performs the conversion.

impl From<RangeExpr> for Expr[src]

fn from(node: RangeExpr) -> Expr[src]

Performs the conversion.

impl From<RecordExpr> for Expr[src]

fn from(node: RecordExpr) -> Expr[src]

Performs the conversion.

impl From<RefExpr> for Expr[src]

fn from(node: RefExpr) -> Expr[src]

Performs the conversion.

impl From<ReturnExpr> for Expr[src]

fn from(node: ReturnExpr) -> Expr[src]

Performs the conversion.

impl From<TryExpr> for Expr[src]

fn from(node: TryExpr) -> Expr[src]

Performs the conversion.

impl From<TupleExpr> for Expr[src]

fn from(node: TupleExpr) -> Expr[src]

Performs the conversion.

impl From<WhileExpr> for Expr[src]

fn from(node: WhileExpr) -> Expr[src]

Performs the conversion.

impl From<YieldExpr> for Expr[src]

fn from(node: YieldExpr) -> Expr[src]

Performs the conversion.

impl Hash for Expr[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl PartialEq<Expr> for Expr[src]

fn eq(&self, other: &Expr) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Expr) -> bool[src]

This method tests for !=.

impl Eq for Expr[src]

impl StructuralEq for Expr[src]

impl StructuralPartialEq for Expr[src]

Auto Trait Implementations

impl !RefUnwindSafe for Expr

impl !Send for Expr

impl !Sync for Expr

impl Unpin for Expr

impl !UnwindSafe for Expr

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<N> AstNodeEdit for N where
    N: AstNode + Clone
[src]

#[must_use]
fn replace_children(
    &self,
    to_replace: RangeInclusive<SyntaxElement>,
    to_insert: impl IntoIterator<Item = SyntaxElement>
) -> Self
[src]

fn indent_level(&self) -> IndentLevel[src]

#[must_use]
fn indent(&self, level: IndentLevel) -> Self
[src]

#[must_use]
fn dedent(&self, level: IndentLevel) -> Self
[src]

#[must_use]
fn reset_indent(&self) -> Self
[src]

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

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

Performs the conversion.

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.

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

Performs the conversion.