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
Source§fn clone(&self) -> PrettyToken
fn clone(&self) -> PrettyToken
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 moreAuto Trait Implementations§
impl Freeze 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