[][src]Struct tui::widgets::Block

pub struct Block<'a> { /* fields omitted */ }

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

impl<'a> Block<'a>[src]

pub fn title<T>(self, title: T) -> Block<'a> where
    T: Into<Spans<'a>>, 
[src]

pub fn title_style(self, style: Style) -> Block<'a>[src]

👎 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 border_style(self, style: Style) -> Block<'a>[src]

pub fn style(self, style: Style) -> Block<'a>[src]

pub fn borders(self, flag: Borders) -> Block<'a>[src]

pub fn border_type(self, border_type: BorderType) -> Block<'a>[src]

pub fn inner(&self, area: Rect) -> Rect[src]

Compute the inner area of a block based on its border visibility rules.

Trait Implementations

impl<'a> Clone for Block<'a>[src]

impl<'a> Debug for Block<'a>[src]

impl<'a> Default for Block<'a>[src]

impl<'a> Widget for Block<'a>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.