#[repr(u8)]pub enum AssignmentOperator {
Show 16 variants
Assign = 0,
Addition = 1,
Subtraction = 2,
Multiplication = 3,
Division = 4,
Remainder = 5,
Exponential = 6,
ShiftLeft = 7,
ShiftRight = 8,
ShiftRightZeroFill = 9,
BitwiseOR = 10,
BitwiseXOR = 11,
BitwiseAnd = 12,
LogicalOr = 13,
LogicalAnd = 14,
LogicalNullish = 15,
}Expand description
Variants§
Assign = 0
=
Addition = 1
+=
Subtraction = 2
-=
Multiplication = 3
*=
Division = 4
/=
Remainder = 5
%=
Exponential = 6
**=
ShiftLeft = 7
<<=
ShiftRight = 8
>>=
ShiftRightZeroFill = 9
>>>=
BitwiseOR = 10
|=
BitwiseXOR = 11
^=
BitwiseAnd = 12
&=
LogicalOr = 13
||=
LogicalAnd = 14
&&=
LogicalNullish = 15
??=
Implementations§
Source§impl AssignmentOperator
impl AssignmentOperator
Sourcepub fn is_logical(self) -> bool
pub fn is_logical(self) -> bool
Returns true for ’||=, &&=, and ??=`.
Sourcepub fn is_arithmetic(self) -> bool
pub fn is_arithmetic(self) -> bool
Returns true for +=, -=, *=, /=, %=, and **=.
Sourcepub fn is_bitwise(self) -> bool
pub fn is_bitwise(self) -> bool
Returns true for |=, ^=, &=, <<=, >>=, and >>>=.
Sourcepub fn to_logical_operator(self) -> Option<LogicalOperator>
pub fn to_logical_operator(self) -> Option<LogicalOperator>
Get LogicalOperator corresponding to this AssignmentOperator.
Sourcepub fn to_binary_operator(self) -> Option<BinaryOperator>
pub fn to_binary_operator(self) -> Option<BinaryOperator>
Get BinaryOperator corresponding to this AssignmentOperator.
Trait Implementations§
Source§impl Clone for AssignmentOperator
impl Clone for AssignmentOperator
Source§fn clone(&self) -> AssignmentOperator
fn clone(&self) -> AssignmentOperator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'new_alloc> CloneIn<'new_alloc> for AssignmentOperator
impl<'new_alloc> CloneIn<'new_alloc> for AssignmentOperator
Source§type Cloned = AssignmentOperator
type Cloned = AssignmentOperator
The type of the cloned object. Read more
Source§fn clone_in_impl(
&self,
_with_semantic_ids: CloneInSemanticIds,
allocator: &'new_alloc Allocator,
) -> <AssignmentOperator as CloneIn<'new_alloc>>::Cloned
fn clone_in_impl( &self, _with_semantic_ids: CloneInSemanticIds, allocator: &'new_alloc Allocator, ) -> <AssignmentOperator as CloneIn<'new_alloc>>::Cloned
Clone
self into allocator, threading whether semantic ids should be preserved as a
runtime with_semantic_ids flag rather than as two separate methods. Read moreSource§fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned
fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned
Clone
self into the given allocator. allocator may be the same one
that self is already in.Source§fn clone_in_with_semantic_ids(
&self,
allocator: &'new_alloc Allocator,
) -> Self::Cloned
fn clone_in_with_semantic_ids( &self, allocator: &'new_alloc Allocator, ) -> Self::Cloned
Almost identical as
clone_in, but for some special type, it will also clone the semantic ids.
Please use this method only if you make sure semantic info is synced with the ast node.Source§impl ContentEq for AssignmentOperator
impl ContentEq for AssignmentOperator
Source§fn content_eq(&self, other: &AssignmentOperator) -> bool
fn content_eq(&self, other: &AssignmentOperator) -> bool
This method tests for contents of
self and other to be equal.Source§fn content_ne(&self, other: &Self) -> bool
fn content_ne(&self, other: &Self) -> bool
This method tests for contents of
self and other not to be equal.
The default implementation is almost always
sufficient, and should not be overridden without very good reason.impl Copy for AssignmentOperator
Source§impl Debug for AssignmentOperator
impl Debug for AssignmentOperator
Source§impl<'a> Dummy<'a> for AssignmentOperator
impl<'a> Dummy<'a> for AssignmentOperator
Source§fn dummy(allocator: &'a Allocator) -> AssignmentOperator
fn dummy(allocator: &'a Allocator) -> AssignmentOperator
Create a dummy AssignmentOperator.
Does not allocate any data into arena.
impl Eq for AssignmentOperator
Source§impl PartialEq for AssignmentOperator
impl PartialEq for AssignmentOperator
impl StructuralPartialEq for AssignmentOperator
Auto Trait Implementations§
impl Forget for AssignmentOperator
impl Freeze for AssignmentOperator
impl Move for AssignmentOperator
impl RefUnwindSafe for AssignmentOperator
impl Send for AssignmentOperator
impl Sync for AssignmentOperator
impl Unpin for AssignmentOperator
impl UnsafeUnpin for AssignmentOperator
impl UnwindSafe for AssignmentOperator
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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