pub struct Bordered<'a> { /* private fields */ }Expand description
A simple bordered container with a title. Renders a block border and exposes the inner area for composing other widgets.
Implementations§
Source§impl<'a> Bordered<'a>
impl<'a> Bordered<'a>
Sourcepub fn new(title: impl Into<Cow<'a, str>>) -> Self
pub fn new(title: impl Into<Cow<'a, str>>) -> Self
Creates a bordered container with the given title.
Sourcepub fn palette(self, palette: AislingPalette) -> Self
pub fn palette(self, palette: AislingPalette) -> Self
Sets the color palette.
Sourcepub fn render_inner(&self, buf: &mut Buffer, area: Rect) -> Rect
pub fn render_inner(&self, buf: &mut Buffer, area: Rect) -> Rect
Renders the border and returns the inner content area.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Bordered<'a>
impl<'a> RefUnwindSafe for Bordered<'a>
impl<'a> Send for Bordered<'a>
impl<'a> Sync for Bordered<'a>
impl<'a> Unpin for Bordered<'a>
impl<'a> UnsafeUnpin for Bordered<'a>
impl<'a> UnwindSafe for Bordered<'a>
Blanket Implementations§
Source§impl<W> AislingExt for Wwhere
W: Widget,
impl<W> AislingExt for Wwhere
W: Widget,
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