pub enum Text {
Str(String),
Lines(Vec<Line>),
Full {
lines: Vec<Line>,
style: Option<Style>,
alignment: Option<Alignment>,
},
}Expand description
ratatui Text: a string, an array of lines, or {lines, style?, alignment?}.
Variants§
Str(String)
Shorthand: plain string (splits on \n).
Lines(Vec<Line>)
Shorthand: array of lines.
Full
Full form.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Text
impl<'de> Deserialize<'de> for Text
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Text
Source§impl Stylize<Text> for Text
impl Stylize<Text> for Text
Source§fn underline_color(self, color: Color) -> T
fn underline_color(self, color: Color) -> T
Sets the underline colour token.
Source§fn underlined(self) -> T
fn underlined(self) -> T
Adds the
UNDERLINED modifier.Source§fn slow_blink(self) -> T
fn slow_blink(self) -> T
Adds the
SLOW_BLINK modifier.Source§fn rapid_blink(self) -> T
fn rapid_blink(self) -> T
Adds the
RAPID_BLINK modifier.Adds the
HIDDEN modifier.Source§fn crossed_out(self) -> T
fn crossed_out(self) -> T
Adds the
CROSSED_OUT modifier.Source§impl Stylize<Text> for Vec<Line>
impl Stylize<Text> for Vec<Line>
Source§fn underline_color(self, color: Color) -> T
fn underline_color(self, color: Color) -> T
Sets the underline colour token.
Source§fn underlined(self) -> T
fn underlined(self) -> T
Adds the
UNDERLINED modifier.Source§fn slow_blink(self) -> T
fn slow_blink(self) -> T
Adds the
SLOW_BLINK modifier.Source§fn rapid_blink(self) -> T
fn rapid_blink(self) -> T
Adds the
RAPID_BLINK modifier.Adds the
HIDDEN modifier.Source§fn crossed_out(self) -> T
fn crossed_out(self) -> T
Adds the
CROSSED_OUT modifier.Auto Trait Implementations§
impl Freeze for Text
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnsafeUnpin for Text
impl UnwindSafe for Text
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