pub enum PrettyToken {
Keyword(String),
Ident(String),
Literal(String),
Operator(String),
Space,
LineBreak,
}Expand description
A stream of pretty-printable tokens.
Variants§
Keyword(String)
A keyword.
Ident(String)
An identifier.
Literal(String)
A literal (number, string, etc.).
Operator(String)
An operator or punctuation.
Space
Whitespace.
LineBreak
A line break.
Implementations§
Source§impl PrettyToken
impl PrettyToken
Sourcepub fn colored_text(&self, cs: &ColorScheme) -> String
pub fn colored_text(&self, cs: &ColorScheme) -> String
Returns colored text using the given color scheme.
Trait Implementations§
Source§impl Clone for PrettyToken
impl Clone for PrettyToken
Auto Trait Implementations§
impl Forget for PrettyToken
impl Freeze for PrettyToken
impl Move for PrettyToken
impl RefUnwindSafe for PrettyToken
impl Send for PrettyToken
impl Sync for PrettyToken
impl Unpin for PrettyToken
impl UnsafeUnpin for PrettyToken
impl UnwindSafe for PrettyToken
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