pub enum RegexTokenType {
Eof,
Whitespace,
Identifier,
Operator,
Punctuation,
Unknown,
}Expand description
Regex token types.
Variants§
Eof
End of file.
Whitespace
Whitespace.
Identifier
Identifier.
Operator
Operator.
Punctuation
Punctuation.
Unknown
Unknown.
Trait Implementations§
Source§impl Clone for RegexTokenType
impl Clone for RegexTokenType
Source§fn clone(&self) -> RegexTokenType
fn clone(&self) -> RegexTokenType
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 RegexTokenType
impl Debug for RegexTokenType
Source§impl<'de> Deserialize<'de> for RegexTokenType
impl<'de> Deserialize<'de> for RegexTokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<RegexTokenType> for RegexElementType
impl From<RegexTokenType> for RegexElementType
Source§fn from(token: RegexTokenType) -> Self
fn from(token: RegexTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for RegexTokenType
impl Hash for RegexTokenType
Source§impl PartialEq for RegexTokenType
impl PartialEq for RegexTokenType
Source§impl Serialize for RegexTokenType
impl Serialize for RegexTokenType
Source§impl TokenType for RegexTokenType
impl TokenType for RegexTokenType
Source§const END_OF_STREAM: Self = Self::Eof
const END_OF_STREAM: Self = Self::Eof
A constant representing the end of the input stream.
Source§type Role = UniversalTokenRole
type Role = UniversalTokenRole
The associated role type for this token kind.
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this token matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalTokenRole) -> bool
fn is_universal(&self, role: UniversalTokenRole) -> bool
Returns true if this token matches the specified universal role.
Source§fn is_comment(&self) -> bool
fn is_comment(&self) -> bool
Returns true if this token represents a comment.
Source§fn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if this token represents whitespace.
Source§fn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.).
Source§fn is_end_of_stream(&self) -> bool
fn is_end_of_stream(&self) -> bool
Returns true if this token represents the end of the input stream.
impl Copy for RegexTokenType
impl Eq for RegexTokenType
impl StructuralPartialEq for RegexTokenType
Auto Trait Implementations§
impl Freeze for RegexTokenType
impl RefUnwindSafe for RegexTokenType
impl Send for RegexTokenType
impl Sync for RegexTokenType
impl Unpin for RegexTokenType
impl UnsafeUnpin for RegexTokenType
impl UnwindSafe for RegexTokenType
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