Struct TableContext

Source
pub struct TableContext {
    pub focus: bool,
    pub selected_cell: bool,
    pub selected_row: bool,
    pub selected_column: bool,
    pub style: Style,
    pub row_style: Option<Style>,
    pub select_style: Option<Style>,
    pub space_area: Rect,
    pub row_area: Rect,
    pub non_exhaustive: NonExhaustive,
}
Expand description

Render-context for rendering a table-cell.

Fields§

§focus: bool

Focus flag is set.

§selected_cell: bool

Cell is selected.

§selected_row: bool

Row of the cell is selected.

§selected_column: bool

Column of the cell is selected.

§style: Style

Base style

§row_style: Option<Style>

Row style if any.

§select_style: Option<Style>

Selection style if any.

§space_area: Rect

Spacing after the cell. It’s guaranteed that this is writeable in the buffer given to render_cell.

§row_area: Rect

Total area for the current row.

§non_exhaustive: NonExhaustive

Construct with ..Default::default()

Trait Implementations§

Source§

impl Debug for TableContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.