pub enum UserDefinableOperator {
}
Expand description
A user-definable operator: +
, *
, |
, etc.
Solidity reference: https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityParser.userDefinableOperator
Variants§
BitAnd(And)
&
BitNot(Tilde)
~
BitOr(Or)
|
BitXor(Caret)
^
Add(Plus)
+
Div(Slash)
/
Rem(Percent)
%
Mul(Star)
*
Sub(Minus)
-
Eq(EqEq)
==
Ge(Ge)
>=
Gt(Gt)
>
Le(Le)
<=
Lt(Lt)
<
Ne(Ne)
!=
Implementations§
Source§impl UserDefinableOperator
impl UserDefinableOperator
Sourcepub fn new_bit_and(span: Span) -> Self
pub fn new_bit_and(span: Span) -> Self
Creates a new BitAnd
operator with the given span
.
Sourcepub fn new_bit_not(span: Span) -> Self
pub fn new_bit_not(span: Span) -> Self
Creates a new BitNot
operator with the given span
.
Sourcepub fn new_bit_or(span: Span) -> Self
pub fn new_bit_or(span: Span) -> Self
Creates a new BitOr
operator with the given span
.
Sourcepub fn new_bit_xor(span: Span) -> Self
pub fn new_bit_xor(span: Span) -> Self
Creates a new BitXor
operator with the given span
.
pub fn peek(input: ParseStream<'_>, lookahead: &Lookahead1<'_>) -> bool
pub const fn as_str(self) -> &'static str
pub const fn as_debug_str(self) -> &'static str
Sourcepub const fn is_bit_and(self) -> bool
pub const fn is_bit_and(self) -> bool
Returns true if self
matches Self::BitAnd
.
Sourcepub const fn is_bit_not(self) -> bool
pub const fn is_bit_not(self) -> bool
Returns true if self
matches Self::BitNot
.
Sourcepub const fn is_bit_xor(self) -> bool
pub const fn is_bit_xor(self) -> bool
Returns true if self
matches Self::BitXor
.
Trait Implementations§
Source§impl Clone for UserDefinableOperator
impl Clone for UserDefinableOperator
Source§fn clone(&self) -> UserDefinableOperator
fn clone(&self) -> UserDefinableOperator
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 Debug for UserDefinableOperator
impl Debug for UserDefinableOperator
Source§impl Display for UserDefinableOperator
impl Display for UserDefinableOperator
Source§impl Hash for UserDefinableOperator
impl Hash for UserDefinableOperator
Source§impl Parse for UserDefinableOperator
impl Parse for UserDefinableOperator
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for UserDefinableOperator
impl PartialEq for UserDefinableOperator
Source§impl Spanned for UserDefinableOperator
impl Spanned for UserDefinableOperator
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.impl Copy for UserDefinableOperator
impl Eq for UserDefinableOperator
Auto Trait Implementations§
impl Freeze for UserDefinableOperator
impl RefUnwindSafe for UserDefinableOperator
impl !Send for UserDefinableOperator
impl !Sync for UserDefinableOperator
impl Unpin for UserDefinableOperator
impl UnwindSafe for UserDefinableOperator
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