Struct conciliator::Tag
source · pub struct Tag<'s>(pub Color, pub &'s str);
Expand description
Wraps a str
to be Inline
d as a colored [ tag ]
Simply calls Paint::tag
when Inline
d, appending the str
in square brackets, with a trailing space.
The color of the brackets is determined by Palette::tag
and the entire segment is in bold.
let con = conciliator::init();
use conciliator::{Conciliator, Tag, style::Color};
con.line(Tag(Color::Alpha, "×")).push("A new tag!");
[ × ] A new tag!
(Obviously the formatting & colors aren’t reproduced here.)
Tuple Fields§
§0: Color
§1: &'s str
Trait Implementations§
Auto Trait Implementations§
impl<'s> Freeze for Tag<'s>
impl<'s> RefUnwindSafe for Tag<'s>
impl<'s> Send for Tag<'s>
impl<'s> Sync for Tag<'s>
impl<'s> Unpin for Tag<'s>
impl<'s> UnwindSafe for Tag<'s>
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
source§impl<T> InitialContent for T
impl<T> InitialContent for T
source§fn init_buffer(&self, buf: &mut Buffer)
fn init_buffer(&self, buf: &mut Buffer)
Initialize the buffer