pub enum TokOpt {
Some(String, String),
None(String),
}
Expand description
This is an enum for representing tokens.
Variants§
Some(String, String)
The Some variant represents a token being present in the format Some(TEXT, NAME).
So for a comment token, you can expect to see Some(“/* comment */”, “comment”) provided that you defined the comment using either the keyword or bounded function on Highlighter
None(String)
The None variant represents just plain text.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for TokOpt
impl Send for TokOpt
impl Sync for TokOpt
impl Unpin for TokOpt
impl UnwindSafe for TokOpt
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