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")
.title_style(Style::default().fg(Color::Red))
.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(self, title: &'a str) -> Block<'a>
pub fn title_style(self, style: Style) -> 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> Copy 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> UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more