pub enum Operator {
Show 22 variants
Newline,
And,
AndAnd,
OpenParen,
CloseParen,
Semicolon,
SemicolonSemicolon,
Less,
LessAnd,
LessOpenParen,
LessLess,
LessLessDash,
LessLessLess,
LessGreater,
Greater,
GreaterAnd,
GreaterOpenParen,
GreaterGreater,
GreaterGreaterBar,
GreaterBar,
Bar,
BarBar,
}
Expand description
Operator token identifier.
Variants§
Newline
Newline
And
&
AndAnd
&&
OpenParen
(
CloseParen
)
Semicolon
;
SemicolonSemicolon
;;
Less
<
LessAnd
<&
LessOpenParen
<(
LessLess
<<
LessLessDash
<<-
LessLessLess
<<<
LessGreater
<>
Greater
>
GreaterAnd
>&
GreaterOpenParen
>(
GreaterGreater
>>
GreaterGreaterBar
>>|
GreaterBar
>|
Bar
|
BarBar
||
Implementations§
Source§impl Operator
impl Operator
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Returns the literal string representation of the operator.
Sourcepub const fn is_clause_delimiter(self) -> bool
pub const fn is_clause_delimiter(self) -> bool
Determines if this token can be a delimiter of a clause.
This function returns true
for CloseParen
and SemicolonSemicolon
,
and false
for others.
Trait Implementations§
impl Copy for Operator
impl Eq for Operator
impl StructuralPartialEq for Operator
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnwindSafe for Operator
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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