pub enum Token<'a> {
Text {
text: &'a [u8],
width: u16,
},
Escape(&'a [u8]),
Control(u8),
}Expand description
A single token produced by tokenize.
Variants§
Text
A grapheme of visible text with its display width.
Escape(&'a [u8])
An ANSI escape sequence (passed through verbatim, no width).
Control(u8)
A single control byte (C0, DEL, or a non-introducer C1) that isn’t part of an escape sequence.
Trait Implementations§
impl<'a> Eq for Token<'a>
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnsafeUnpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
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