use crate::print::{Grapheme, UnicodeWidthGraphemes}; use nu_ansi_term::{AnsiString, Style}; use std::fmt; use unicode_segmentation::UnicodeSegmentation; /// Type that holds text with an associated style #[derive(Clone)] pub struct TextSegment { /// The segment's style. If None, will inherit the style of the module containing it. style: Option