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§
Sourcefn inner_if_some(&self, area: Rect) -> Rect
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