pub struct Block<'a> {
pub title: Option<&'a str>,
pub title_alignment: Alignment,
pub borders: u8,
pub border_style: Style,
pub border_type: BorderType,
pub style: Style,
}Expand description
A bordered container widget with optional title.
Renders a box border around a region with configurable borders, title, and styles.
§Examples
use extui::{Block, BorderType, Alignment};
let block = Block {
title: Some("My Title"),
borders: Block::ALL,
..Default::default()
};Fields§
§title: Option<&'a str>Optional title displayed on the top border.
title_alignment: AlignmentAlignment of the title within the top border.
borders: u8§border_style: StyleStyle applied to border characters.
border_type: BorderTypeType of border characters to use.
style: StyleStyle applied to the block background.
Implementations§
Trait Implementations§
impl<'a> Eq for Block<'a>
impl<'a> StructuralPartialEq for Block<'a>
Auto Trait Implementations§
impl<'a> Freeze for Block<'a>
impl<'a> RefUnwindSafe for Block<'a>
impl<'a> Send for Block<'a>
impl<'a> Sync for Block<'a>
impl<'a> Unpin for Block<'a>
impl<'a> UnwindSafe for Block<'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