pub enum Keyword {
Show 36 variants
Break,
Case,
Catch,
Class,
Const,
Continue,
Debugger,
Default,
Delete,
Do,
Else,
Enum,
Export,
Extends,
False,
Finally,
For,
Function,
If,
Import,
In,
Instanceof,
New,
Null,
Return,
Super,
Switch,
This,
Throw,
True,
Try,
Typeof,
Var,
Void,
While,
With,
}Expand description
A reserved word that is a keyword in every context (ES2025 §12.7.2), plus
enum (always reserved).
Context-sensitive words (let, static, yield, await, async, of,
get, set, from, as, target, …) are not keywords here: they are
identifiers whose meaning the parser decides, exactly like an engine does.
Variants§
Break
break
Case
case
Catch
catch
Class
class
Const
const
Continue
continue
Debugger
debugger
Default
default
Delete
delete
Do
do
Else
else
Enum
enum (reserved in all modes)
Export
export
Extends
extends
False
false
Finally
finally
For
for
Function
function
If
if
Import
import
In
in
Instanceof
instanceof
New
new
Null
null
Return
return
Super
super
Switch
switch
This
this
Throw
throw
True
true
Try
try
Typeof
typeof
Var
var
Void
void
While
while
With
with
Implementations§
Trait Implementations§
impl Copy for Keyword
impl Eq for Keyword
impl StructuralPartialEq for Keyword
Auto Trait Implementations§
impl Forget for Keyword
impl Freeze for Keyword
impl Move for Keyword
impl RefUnwindSafe for Keyword
impl Send for Keyword
impl Sync for Keyword
impl Unpin for Keyword
impl UnsafeUnpin for Keyword
impl UnwindSafe for Keyword
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