[−][src]Enum rustpython_parser::ast::StatementType
Abstract syntax tree nodes for python statements.
Variants
A break statement.
A continue statement.
A return statement.
This is used to return from a function.
Fields of Return
value: Option<Expression>An import statement.
Fields of Import
names: Vec<ImportSymbol>An import from statement.
Fields of ImportFrom
A pass statement.
An assert statement.
Fields of Assert
test: Expressionmsg: Option<Expression>A del statement, to delete some variables.
Fields of Delete
targets: Vec<Expression>Variable assignment. Note that we can assign to multiple targets.
Fields of Assign
targets: Vec<Expression>value: ExpressionAugmented assignment.
Fields of AugAssign
A type annotated assignment.
Fields of AnnAssign
An expression used as a statement.
Fields of Expression
expression: ExpressionThe global statement,
to declare names as global variables.
A nonlocal statement,
to declare names a non-local variables.
An if statement.
Fields of If
A while statement.
Fields of While
The with statement.
A for statement.
Contains the body of the loop, and the else clause.
Fields of For
A raise statement.
Fields of Raise
exception: Option<Expression>cause: Option<Expression>A try statement.
Fields of ClassDef
A function definition. Contains the name of the function, it's body some decorators and formal parameters to the function.
Fields of FunctionDef
is_async: boolname: Stringargs: Box<Parameters>body: Suitedecorator_list: Vec<Expression>returns: Option<Expression>Trait Implementations
impl Debug for StatementType[src]
impl PartialEq<StatementType> for StatementType[src]
fn eq(&self, other: &StatementType) -> bool[src]
fn ne(&self, other: &StatementType) -> bool[src]
impl StructuralPartialEq for StatementType[src]
Auto Trait Implementations
impl RefUnwindSafe for StatementType
impl Send for StatementType
impl Sync for StatementType
impl Unpin for StatementType
impl UnwindSafe for StatementType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,