pub struct Banner<'a> {
pub width: u8,
pub auto_widen: bool,
/* private fields */
}
Fields§
§width: u8
§auto_widen: bool
Implementations§
Source§impl<'a> Banner<'a>
impl<'a> Banner<'a>
Sourcepub fn add_header<'b>(&'b mut self, text: &'a str, level: HeaderLevel)
pub fn add_header<'b>(&'b mut self, text: &'a str, level: HeaderLevel)
Adds a header to the banner.
§Arguments
self
- The banner to add the line of text to.text
- The text content of the header.level
- The header level.
Sourcepub fn add_text<'b>(&'b mut self, text: &'a str)
pub fn add_text<'b>(&'b mut self, text: &'a str)
Adds a line of text to the banner.
§Arguments
self
- The banner to add the line of text to.text
- The text to add.
Sourcepub fn add_key_value<'b>(&'b mut self, key: &'a str, value: &'a str)
pub fn add_key_value<'b>(&'b mut self, key: &'a str, value: &'a str)
Adds a line showing a key value pair to the banner.
§Arguments
self
- The banner to add the line to.key
- The key name.value
- The value as text.
Auto Trait Implementations§
impl<'a> Freeze for Banner<'a>
impl<'a> !RefUnwindSafe for Banner<'a>
impl<'a> !Send for Banner<'a>
impl<'a> !Sync for Banner<'a>
impl<'a> Unpin for Banner<'a>
impl<'a> !UnwindSafe for Banner<'a>
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