pub struct Table {
pub states: TableStates,
/* private fields */
}
Expand description
§Table
represents a read-only text component without any container.
Fields§
§states: TableStates
Implementations§
Source§impl Table
impl Table
pub fn foreground(self, fg: Color) -> Self
pub fn background(self, bg: Color) -> Self
pub fn inactive(self, s: Style) -> Self
pub fn modifiers(self, m: TextModifiers) -> Self
pub fn borders(self, b: Borders) -> Self
pub fn title<S: Into<String>>(self, t: S, a: Alignment) -> Self
pub fn step(self, step: usize) -> Self
pub fn scroll(self, scrollable: bool) -> Self
pub fn highlighted_str<S: Into<String>>(self, s: S) -> Self
pub fn highlighted_color(self, c: Color) -> Self
pub fn column_spacing(self, w: u16) -> Self
pub fn row_height(self, h: u16) -> Self
pub fn widths(self, w: &[u16]) -> Self
pub fn headers<S: AsRef<str>>(self, headers: &[S]) -> Self
pub fn table(self, t: PropTable) -> Self
pub fn rewind(self, r: bool) -> Self
Sourcepub fn selected_line(self, line: usize) -> Self
pub fn selected_line(self, line: usize) -> Self
Set initial selected line
This method must be called after rows
and scrollable
in order to work
Trait Implementations§
Source§impl MockComponent for Table
impl MockComponent for Table
Source§fn view(&mut self, render: &mut Frame<'_>, area: Rect)
fn view(&mut self, render: &mut Frame<'_>, area: Rect)
Based on the current properties and states, renders the component in the provided area frame.
Render can also mutate the component state if this is required
Source§fn query(&self, attr: Attribute) -> Option<AttrValue>
fn query(&self, attr: Attribute) -> Option<AttrValue>
Query attribute of component properties.
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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> 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