Struct banner::Banner [−][src]
Fields
width: u8
auto_widen: bool
Implementations
impl<'a> Banner<'a>
[src]
pub fn new(style: &'a Style) -> Banner<'a>
[src]
Creates a new banner with default values.
pub fn add_header<'b>(&'b mut self, text: &'a str, level: HeaderLevel)
[src]
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.
pub fn add_text<'b>(&'b mut self, text: &'a str)
[src]
Adds a line of text to the banner.
Arguments
self
- The banner to add the line of text to.text
- The text to add.
pub fn add_key_value<'b>(&'b mut self, key: &'a str, value: &'a str)
[src]
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.
pub fn assemble(self: &Banner<'a>) -> String
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Banner<'a>
[src]
impl<'a> !Send for Banner<'a>
[src]
impl<'a> !Sync for Banner<'a>
[src]
impl<'a> Unpin for Banner<'a>
[src]
impl<'a> !UnwindSafe for Banner<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,