#[repr(u8)]pub enum Punct {
Show 49 variants
LBracket = 0,
RBracket = 1,
LParen = 2,
RParen = 3,
LBrace = 4,
RBrace = 5,
Dot = 6,
Ellipsis = 7,
Arrow = 8,
PlusPlus = 9,
MinusMinus = 10,
Amp = 11,
Star = 12,
Plus = 13,
Minus = 14,
Tilde = 15,
Bang = 16,
Slash = 17,
Percent = 18,
Shl = 19,
Shr = 20,
Lt = 21,
Gt = 22,
Le = 23,
Ge = 24,
EqEq = 25,
Ne = 26,
Caret = 27,
Pipe = 28,
AmpAmp = 29,
PipePipe = 30,
Question = 31,
Colon = 32,
ColonColon = 33,
Semi = 34,
Eq = 35,
StarEq = 36,
SlashEq = 37,
PercentEq = 38,
PlusEq = 39,
MinusEq = 40,
ShlEq = 41,
ShrEq = 42,
AmpEq = 43,
CaretEq = 44,
PipeEq = 45,
Comma = 46,
Hash = 47,
HashHash = 48,
}Expand description
A punctuator.
The C23 set, including ::, plus the digraphs, which map onto the punctuator they stand
for rather than getting their own variants. A digraph is a spelling, not a meaning, so the
spelling lives in TokenFlags::DIGRAPH and everything that reads a punctuator sees one
kind of [ rather than two.
Variants§
LBracket = 0
[, or the digraph <:.
RBracket = 1
], or the digraph :>.
LParen = 2
(.
RParen = 3
).
LBrace = 4
{, or the digraph <%.
RBrace = 5
}, or the digraph %>.
Dot = 6
..
Ellipsis = 7
....
Arrow = 8
->.
PlusPlus = 9
++.
MinusMinus = 10
--.
Amp = 11
&.
Star = 12
*.
Plus = 13
+.
Minus = 14
-.
Tilde = 15
~.
Bang = 16
!.
Slash = 17
/.
Percent = 18
%.
Shl = 19
<<.
Shr = 20
>>.
Lt = 21
<.
Gt = 22
>.
Le = 23
<=.
Ge = 24
>=.
EqEq = 25
==.
Ne = 26
!=.
Caret = 27
^.
Pipe = 28
|.
AmpAmp = 29
&&.
PipePipe = 30
||.
Question = 31
?.
Colon = 32
:.
ColonColon = 33
::, which C23 added for attribute namespaces.
Semi = 34
;.
Eq = 35
=.
StarEq = 36
*=.
SlashEq = 37
/=.
PercentEq = 38
%=.
PlusEq = 39
+=.
MinusEq = 40
-=.
ShlEq = 41
<<=.
ShrEq = 42
>>=.
AmpEq = 43
&=.
CaretEq = 44
^=.
PipeEq = 45
|=.
Comma = 46
,.
Hash = 47
#, or the digraph %:.
HashHash = 48
##, or the digraph %:%:.
Implementations§
Trait Implementations§
impl Copy for Punct
impl Eq for Punct
Source§impl Ord for Punct
impl Ord for Punct
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Punct
impl PartialOrd for Punct
impl StructuralPartialEq for Punct
Auto Trait Implementations§
impl Freeze for Punct
impl RefUnwindSafe for Punct
impl Send for Punct
impl Sync for Punct
impl Unpin for Punct
impl UnsafeUnpin for Punct
impl UnwindSafe for Punct
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