pub enum Statement {
Show 17 variants
Return(Option<Expr>, Span),
Break(Span),
Continue(Span),
VariableDecl(VariableDecl, Span),
Assignment(Assignment, Span),
Expression(Expr, Span),
For(ForLoop, Span),
While(WhileLoop, Span),
If(IfStatement, Span),
Extend(ExtendStatement, Span),
RemoveTarget(Span),
SetParamType {
param_name: String,
type_annotation: TypeAnnotation,
span: Span,
},
SetReturnType {
type_annotation: TypeAnnotation,
span: Span,
},
SetReturnExpr {
expression: Expr,
span: Span,
},
ReplaceBody {
body: Vec<Statement>,
span: Span,
},
ReplaceBodyExpr {
expression: Expr,
span: Span,
},
ReplaceModuleExpr {
expression: Expr,
span: Span,
},
}Variants§
Return(Option<Expr>, Span)
Return statement
Break(Span)
Break statement
Continue(Span)
Continue statement
VariableDecl(VariableDecl, Span)
Variable declaration
Assignment(Assignment, Span)
Assignment
Expression(Expr, Span)
Expression statement
For(ForLoop, Span)
For loop
While(WhileLoop, Span)
While loop
If(IfStatement, Span)
If statement
Extend(ExtendStatement, Span)
Comptime-only type extension directive inside comptime handlers/blocks.
RemoveTarget(Span)
Comptime-only directive to remove the current annotation target.
SetParamType
Comptime-only directive to set a function parameter type.
SetReturnType
Comptime-only directive to set a function return type.
SetReturnExpr
Comptime-only directive to set a function return type from an expression evaluated in comptime context.
ReplaceBody
Comptime-only directive to replace a function body.
ReplaceBodyExpr
Comptime-only directive to replace a function body from an expression evaluated in comptime context.
ReplaceModuleExpr
Comptime-only directive to replace a module body from an expression evaluated in comptime context.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Statement
impl<'de> Deserialize<'de> for Statement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Statement
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnsafeUnpin for Statement
impl UnwindSafe for Statement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more