Struct ratatui_block::block_grid::BlockGrid
source · pub struct BlockGrid { /* private fields */ }Expand description
Renders a block border and a connected grid inside.
Implementations§
source§impl BlockGrid
impl BlockGrid
pub fn new() -> Self
sourcepub fn from_layout(layout: &[Rect]) -> Self
pub fn from_layout(layout: &[Rect]) -> Self
Create a grid line for every single cell gap between the given areas.
If the areas overlap, or if they have overlapping x- or y-ranges the results may not be what you expect.
sourcepub fn border_style(self, style: Style) -> Self
pub fn border_style(self, style: Style) -> Self
Border style for the border.
sourcepub fn border_type(self, border_type: BorderType) -> Self
pub fn border_type(self, border_type: BorderType) -> Self
Border style for the border.
sourcepub fn border_set(self, border_set: impl BorderSymbolSet + 'static) -> Self
pub fn border_set(self, border_set: impl BorderSymbolSet + 'static) -> Self
Border style for the border.
sourcepub fn horizontal_style(self, style: Style) -> Self
pub fn horizontal_style(self, style: Style) -> Self
Border style for the border.
sourcepub fn horizontal_side(self, side: Side) -> Self
pub fn horizontal_side(self, side: Side) -> Self
Add a horizontal side.
sourcepub fn horizontal_border_type(self, border: BorderType) -> Self
pub fn horizontal_border_type(self, border: BorderType) -> Self
Sets the border type used.
sourcepub fn horizontal_border_set(
self,
border_set: impl BorderSymbolSet + 'static,
) -> Self
pub fn horizontal_border_set( self, border_set: impl BorderSymbolSet + 'static, ) -> Self
Use a BorderSymbolSet.
sourcepub fn horizontal(self, pos: u16) -> Self
pub fn horizontal(self, pos: u16) -> Self
Add a horizontal divider.
sourcepub fn vertical_style(self, style: Style) -> Self
pub fn vertical_style(self, style: Style) -> Self
Border style for the border.
sourcepub fn vertical_side(self, side: Side) -> Self
pub fn vertical_side(self, side: Side) -> Self
Add a vertical side.
sourcepub fn vertical_border_type(self, border: BorderType) -> Self
pub fn vertical_border_type(self, border: BorderType) -> Self
Sets the border type used.
sourcepub fn vertical_border_set(
self,
border_set: impl BorderSymbolSet + 'static,
) -> Self
pub fn vertical_border_set( self, border_set: impl BorderSymbolSet + 'static, ) -> Self
Use a BorderSymbolSet.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockGrid
impl !RefUnwindSafe for BlockGrid
impl !Send for BlockGrid
impl !Sync for BlockGrid
impl Unpin for BlockGrid
impl !UnwindSafe for BlockGrid
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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