ratatui::widgets::block

Trait BlockExt

Source
pub trait BlockExt {
    // Required method
    fn inner_if_some(&self, area: Rect) -> Rect;
}
Expand description

An extension trait for Block that provides some convenience methods.

This is implemented for Option<Block> to simplify the common case of having a widget with an optional block.

Required Methods§

Source

fn inner_if_some(&self, area: Rect) -> Rect

Return the inner area of the block if it is Some. Otherwise, returns area.

This is a useful convenience method for widgets that have an Option<Block> field

Implementations on Foreign Types§

Source§

impl BlockExt for Option<Block<'_>>

Source§

fn inner_if_some(&self, area: Rect) -> Rect

Implementors§