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 Freeze for TokOpt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)