Struct rustpython_ast::StmtFunctionDef
source · pub struct StmtFunctionDef<R = TextRange> {
pub range: R,
pub name: Identifier,
pub args: Box<Arguments<R>>,
pub body: Vec<Stmt<R>>,
pub decorator_list: Vec<Expr<R>>,
pub returns: Option<Box<Expr<R>>>,
pub type_comment: Option<String>,
pub type_params: Vec<TypeParam<R>>,
}
Expand description
See also FunctionDef
Fields§
§range: R
§name: Identifier
§args: Box<Arguments<R>>
§body: Vec<Stmt<R>>
§decorator_list: Vec<Expr<R>>
§returns: Option<Box<Expr<R>>>
§type_comment: Option<String>
§type_params: Vec<TypeParam<R>>
Trait Implementations§
source§impl<R: Clone> Clone for StmtFunctionDef<R>
impl<R: Clone> Clone for StmtFunctionDef<R>
source§fn clone(&self) -> StmtFunctionDef<R>
fn clone(&self) -> StmtFunctionDef<R>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<R: Debug> Debug for StmtFunctionDef<R>
impl<R: Debug> Debug for StmtFunctionDef<R>
source§impl<T, U> Foldable<T, U> for StmtFunctionDef<T>
impl<T, U> Foldable<T, U> for StmtFunctionDef<T>
source§impl<R> From<StmtFunctionDef<R>> for Ast<R>
impl<R> From<StmtFunctionDef<R>> for Ast<R>
source§fn from(payload: StmtFunctionDef<R>) -> Self
fn from(payload: StmtFunctionDef<R>) -> Self
Converts to this type from the input type.
source§impl<R> From<StmtFunctionDef<R>> for Stmt<R>
impl<R> From<StmtFunctionDef<R>> for Stmt<R>
source§fn from(payload: StmtFunctionDef<R>) -> Self
fn from(payload: StmtFunctionDef<R>) -> Self
Converts to this type from the input type.
source§impl<R> Node for StmtFunctionDef<R>
impl<R> Node for StmtFunctionDef<R>
source§impl<R: PartialEq> PartialEq for StmtFunctionDef<R>
impl<R: PartialEq> PartialEq for StmtFunctionDef<R>
source§fn eq(&self, other: &StmtFunctionDef<R>) -> bool
fn eq(&self, other: &StmtFunctionDef<R>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Ranged for StmtFunctionDef<TextRange>
impl Ranged for StmtFunctionDef<TextRange>
impl<R> StructuralPartialEq for StmtFunctionDef<R>
Auto Trait Implementations§
impl<R> Freeze for StmtFunctionDef<R>where
R: Freeze,
impl<R> RefUnwindSafe for StmtFunctionDef<R>where
R: RefUnwindSafe,
impl<R> Send for StmtFunctionDef<R>where
R: Send,
impl<R> Sync for StmtFunctionDef<R>where
R: Sync,
impl<R> Unpin for StmtFunctionDef<R>where
R: Unpin,
impl<R> UnwindSafe for StmtFunctionDef<R>where
R: UnwindSafe,
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