pub struct AssignStmt {
pub target: Expr,
pub op: Option<BinaryOperation>,
pub op_source: Fragment,
pub value: Expr,
}Available on crate feature
ast-models only.Expand description
An assignment, such as x = 1 or x += 1.
Fields§
§target: ExprThe place being assigned to.
op: Option<BinaryOperation>For compound assignments (such as +=), the operation applied. None for plain = assignments.
op_source: FragmentThe source of the assignment operator.
value: ExprThe value being assigned.
Trait Implementations§
Source§impl Clone for AssignStmt
impl Clone for AssignStmt
Source§impl Debug for AssignStmt
impl Debug for AssignStmt
Source§impl PartialEq for AssignStmt
impl PartialEq for AssignStmt
impl StructuralPartialEq for AssignStmt
Auto Trait Implementations§
impl Forget for AssignStmt
impl Freeze for AssignStmt
impl RefUnwindSafe for AssignStmt
impl Send for AssignStmt
impl Sync for AssignStmt
impl Unpin for AssignStmt
impl UnsafeUnpin for AssignStmt
impl UnwindSafe for AssignStmt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more