Trait check_keyword::CheckKeyword
source · pub trait CheckKeyword {
// Required methods
fn is_keyword(&self) -> bool;
fn keyword_status(&self) -> KeywordStatus;
fn into_safe(self) -> String;
}
Expand description
A trait for checking if self
is a keyword.
Required Methods§
sourcefn is_keyword(&self) -> bool
fn is_keyword(&self) -> bool
Check if self
is a strict or reserved keyword.
If you want to check weak keywords, use CheckKeyword::keyword_status.
sourcefn keyword_status(&self) -> KeywordStatus
fn keyword_status(&self) -> KeywordStatus
Returns a detailed description of the type of keyword.