pub enum AssignTargetP<P>where
P: AstPayload,{
Tuple(Vec<Spanned<AssignTargetP<P>>>),
Index(Box<(Spanned<ExprP<P>>, Spanned<ExprP<P>>)>),
Dot(Box<Spanned<ExprP<P>>>, Spanned<String>),
Identifier(Spanned<AssignIdentP<P>>),
}Expand description
In some places e.g. AssignModify, the Tuple case is not allowed.
Variants§
Tuple(Vec<Spanned<AssignTargetP<P>>>)
Index(Box<(Spanned<ExprP<P>>, Spanned<ExprP<P>>)>)
Dot(Box<Spanned<ExprP<P>>>, Spanned<String>)
Identifier(Spanned<AssignIdentP<P>>)
Implementations§
Source§impl<A> AssignTargetP<A>where
A: AstPayload,
impl<A> AssignTargetP<A>where
A: AstPayload,
pub fn into_map_payload<B>(
self,
f: &mut impl AstPayloadFunction<A, B>,
) -> AssignTargetP<B>where
B: AstPayload,
Source§impl<P> AssignTargetP<P>where
P: AstPayload,
impl<P> AssignTargetP<P>where
P: AstPayload,
pub fn visit_expr<'a>(&'a self, f: impl FnMut(&'a Spanned<ExprP<P>>))
pub fn visit_expr_mut<'a>( &'a mut self, f: impl FnMut(&'a mut Spanned<ExprP<P>>), )
Sourcepub fn visit_lvalue<'a>(&'a self, f: impl FnMut(&'a Spanned<AssignIdentP<P>>))
pub fn visit_lvalue<'a>(&'a self, f: impl FnMut(&'a Spanned<AssignIdentP<P>>))
Assuming this expression was on the left-hand-side of an assignment,
visit all the names that are bound by this assignment.
Note that assignments like x[i] = n don’t bind any names.
pub fn visit_lvalue_mut<'a>( &'a mut self, f: impl FnMut(&'a mut Spanned<AssignIdentP<P>>), )
Trait Implementations§
Source§impl<P> Clone for AssignTargetP<P>where
P: Clone + AstPayload,
impl<P> Clone for AssignTargetP<P>where
P: Clone + AstPayload,
Source§fn clone(&self) -> AssignTargetP<P>
fn clone(&self) -> AssignTargetP<P>
Returns a duplicate 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<P> Debug for AssignTargetP<P>where
P: Debug + AstPayload,
impl<P> Debug for AssignTargetP<P>where
P: Debug + AstPayload,
Auto Trait Implementations§
impl<P> Freeze for AssignTargetP<P>
impl<P> RefUnwindSafe for AssignTargetP<P>where
<P as AstPayload>::IdentAssignPayload: RefUnwindSafe,
<P as AstPayload>::DefPayload: RefUnwindSafe,
<P as AstPayload>::IdentPayload: RefUnwindSafe,
<P as AstPayload>::TypeExprPayload: RefUnwindSafe,
impl<P> Send for AssignTargetP<P>where
<P as AstPayload>::IdentAssignPayload: Send,
<P as AstPayload>::DefPayload: Send,
<P as AstPayload>::IdentPayload: Send,
<P as AstPayload>::TypeExprPayload: Send,
impl<P> Sync for AssignTargetP<P>where
<P as AstPayload>::IdentAssignPayload: Sync,
<P as AstPayload>::DefPayload: Sync,
<P as AstPayload>::IdentPayload: Sync,
<P as AstPayload>::TypeExprPayload: Sync,
impl<P> Unpin for AssignTargetP<P>
impl<P> UnwindSafe for AssignTargetP<P>where
<P as AstPayload>::IdentAssignPayload: UnwindSafe,
<P as AstPayload>::DefPayload: UnwindSafe,
<P as AstPayload>::IdentPayload: UnwindSafe,
<P as AstPayload>::TypeExprPayload: 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