pub struct Piece {
pub text: String,
pub token: Token,
}Expand description
One highlight token, split at whitespace so a renamed word does not take the spaces around it with it. The color is still the highlighter’s.
Fields§
§text: StringSource text of this piece.
token: TokenHighlight kind, shared by every character of text.
Trait Implementations§
impl Eq for Piece
impl StructuralPartialEq for Piece
Auto Trait Implementations§
impl Freeze for Piece
impl RefUnwindSafe for Piece
impl Send for Piece
impl Sync for Piece
impl Unpin for Piece
impl UnsafeUnpin for Piece
impl UnwindSafe for Piece
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