pub enum KeywordStatus {
NotKeyword,
Strict {
can_be_raw: bool,
},
Reserved,
Weak {
restriction: WeakRestriction,
},
}Expand description
Detailed information about keywords.
Variants§
NotKeyword
The input was not any kind of keyword.
Strict
Strict keywords are always invalid identifiers.
Fields
Reserved
Reserved keywords are always invalid identifiers, but are not currently used within Rust.
Weak
Weak keywords are only keywords in certain contexts.
Some weak keywords, such as union or macro_rules,
are technically keywords but can still be used in all
contexts.
Fields
§
restriction: WeakRestrictionThe restriction where the keyword cannot be used.
Trait Implementations§
Source§impl Clone for KeywordStatus
impl Clone for KeywordStatus
Source§fn clone(&self) -> KeywordStatus
fn clone(&self) -> KeywordStatus
Returns a duplicate 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 KeywordStatus
impl Debug for KeywordStatus
Source§impl PartialEq for KeywordStatus
impl PartialEq for KeywordStatus
impl Copy for KeywordStatus
impl Eq for KeywordStatus
impl StructuralPartialEq for KeywordStatus
Auto Trait Implementations§
impl Freeze for KeywordStatus
impl RefUnwindSafe for KeywordStatus
impl Send for KeywordStatus
impl Sync for KeywordStatus
impl Unpin for KeywordStatus
impl UnwindSafe for KeywordStatus
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