pub struct Banner { /* private fields */ }Expand description
Startup banner display.
Implementations§
Source§impl Banner
impl Banner
Sourcepub fn new(mode: OutputMode) -> Self
pub fn new(mode: OutputMode) -> Self
Create a new banner with the specified mode.
Sourcepub fn with_config(mode: OutputMode, config: BannerConfig) -> Self
pub fn with_config(mode: OutputMode, config: BannerConfig) -> Self
Create a banner with custom configuration.
Sourcepub fn theme(self, theme: FastApiTheme) -> Self
pub fn theme(self, theme: FastApiTheme) -> Self
Set the theme.
Sourcepub fn render(&self, info: &ServerInfo) -> String
pub fn render(&self, info: &ServerInfo) -> String
Render the banner to a string.
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