pub struct Banner { /* private fields */ }Expand description
A rendered ASCII-art banner.
Banner is a lazy line iterator (per FR-053) from the caller’s
perspective: row buffers are computed once during
Figlet::render, and each call to next() on the iterator
returned by Banner::lines yields one row.
Banner also implements core::fmt::Display; write!(stdout, "{banner}") drives the same lazy iterator and emits a trailing \n
after the final line.
use rusty_figlet::{FigletBuilder, Font};
let banner = FigletBuilder::new()
.font(Font::Standard)
.build()
.expect("build")
.render("X")
.expect("render");
// Iterate lazily; each .next() yields exactly one rendered row.
let mut it = banner.lines();
let _first = it.next();Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Banner
impl RefUnwindSafe for Banner
impl Send for Banner
impl Sync for Banner
impl Unpin for Banner
impl UnsafeUnpin for Banner
impl UnwindSafe for Banner
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