Trait ratatui::widgets::block::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§