Struct rustpython_ast::StmtAnnAssign
source · pub struct StmtAnnAssign<R = TextRange> {
pub range: R,
pub target: Box<Expr<R>>,
pub annotation: Box<Expr<R>>,
pub value: Option<Box<Expr<R>>>,
pub simple: bool,
}
Expand description
See also AnnAssign
Fields§
§range: R
§target: Box<Expr<R>>
§annotation: Box<Expr<R>>
§value: Option<Box<Expr<R>>>
§simple: bool
Trait Implementations§
source§impl<R: Clone> Clone for StmtAnnAssign<R>
impl<R: Clone> Clone for StmtAnnAssign<R>
source§fn clone(&self) -> StmtAnnAssign<R>
fn clone(&self) -> StmtAnnAssign<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 StmtAnnAssign<R>
impl<R: Debug> Debug for StmtAnnAssign<R>
source§impl<T, U> Foldable<T, U> for StmtAnnAssign<T>
impl<T, U> Foldable<T, U> for StmtAnnAssign<T>
source§impl<R> From<StmtAnnAssign<R>> for Ast<R>
impl<R> From<StmtAnnAssign<R>> for Ast<R>
source§fn from(payload: StmtAnnAssign<R>) -> Self
fn from(payload: StmtAnnAssign<R>) -> Self
Converts to this type from the input type.
source§impl<R> From<StmtAnnAssign<R>> for Stmt<R>
impl<R> From<StmtAnnAssign<R>> for Stmt<R>
source§fn from(payload: StmtAnnAssign<R>) -> Self
fn from(payload: StmtAnnAssign<R>) -> Self
Converts to this type from the input type.
source§impl<R> Node for StmtAnnAssign<R>
impl<R> Node for StmtAnnAssign<R>
source§impl<R: PartialEq> PartialEq for StmtAnnAssign<R>
impl<R: PartialEq> PartialEq for StmtAnnAssign<R>
source§fn eq(&self, other: &StmtAnnAssign<R>) -> bool
fn eq(&self, other: &StmtAnnAssign<R>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Ranged for StmtAnnAssign<TextRange>
impl Ranged for StmtAnnAssign<TextRange>
impl<R> StructuralPartialEq for StmtAnnAssign<R>
Auto Trait Implementations§
impl<R> Freeze for StmtAnnAssign<R>where
R: Freeze,
impl<R> RefUnwindSafe for StmtAnnAssign<R>where
R: RefUnwindSafe,
impl<R> Send for StmtAnnAssign<R>where
R: Send,
impl<R> Sync for StmtAnnAssign<R>where
R: Sync,
impl<R> Unpin for StmtAnnAssign<R>where
R: Unpin,
impl<R> UnwindSafe for StmtAnnAssign<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