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
sourceimpl<'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
sourceimpl<'a> Clone for TextBuilder<'a>
impl<'a> Clone for TextBuilder<'a>
sourcefn clone(&self) -> TextBuilder<'a>
fn clone(&self) -> TextBuilder<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'a> Debug for TextBuilder<'a>
impl<'a> Debug for TextBuilder<'a>
sourceimpl<'a> Default for TextBuilder<'a>
impl<'a> Default for TextBuilder<'a>
sourcefn default() -> TextBuilder<'a>
fn default() -> TextBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for TextBuilder<'a>
impl<'a> Send for TextBuilder<'a>
impl<'a> Sync for TextBuilder<'a>
impl<'a> Unpin for TextBuilder<'a>
impl<'a> UnwindSafe for TextBuilder<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more