pub struct Block<'a> { /* private fields */ }
Expand description
Base widget to be used with all upper level ones. It may be used to display a box border around the widget and/or add a title.
§Examples
Block::default()
.title("Block")
.borders(Borders::LEFT | Borders::RIGHT)
.border_style(Style::default().fg(Color::White))
.border_type(BorderType::Rounded)
.style(Style::default().bg(Color::Black));
Implementations§
Source§impl<'a> Block<'a>
impl<'a> Block<'a>
pub fn title<T>(self, title: T) -> Block<'a>
pub fn title_style(self, style: Style) -> Block<'a>
👎Deprecated since 0.10.0: You should use styling capabilities of
text::Spans
given as argument of the title
method to apply styling to the title.pub fn title_alignment(self, alignment: Alignment) -> Block<'a>
pub fn border_style(self, style: Style) -> Block<'a>
pub fn style(self, style: Style) -> Block<'a>
pub fn borders(self, flag: Borders) -> Block<'a>
pub fn border_type(self, border_type: BorderType) -> Block<'a>
Trait Implementations§
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