Struct move_bytecode_viewer::tui::text_builder::TextBuilder
source · pub struct TextBuilder<'a> { /* private fields */ }Expand description
A TextBuilder is used to build up a paragraph, where some parts of it may need to have
different styling, and where this styling may not conform to line boundaries.
Implementations§
source§impl<'a> TextBuilder<'a>
impl<'a> TextBuilder<'a>
sourcepub fn add(&mut self, text: String, style: Style)
pub fn add(&mut self, text: String, style: Style)
Add text with the given styleing to the text builder. This functions tracks newlines in
the text already recorded (in the chunks field), and will splice lines between the
previous text and the new text being added. It respects the style of both the old text
and the newly added text.
Trait Implementations§
source§impl<'a> Clone for TextBuilder<'a>
impl<'a> Clone for TextBuilder<'a>
source§fn clone(&self) -> TextBuilder<'a>
fn clone(&self) -> TextBuilder<'a>
Returns a copy 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 moresource§impl<'a> Debug for TextBuilder<'a>
impl<'a> Debug for TextBuilder<'a>
source§impl<'a> Default for TextBuilder<'a>
impl<'a> Default for TextBuilder<'a>
source§fn default() -> TextBuilder<'a>
fn default() -> TextBuilder<'a>
Returns the “default value” for a type. Read more