[−][src]Struct tui_temp_fork::widgets::Table
A widget to display data in formatted columns
Examples
let row_style = Style::default().fg(Color::White); Table::new( ["Col1", "Col2", "Col3"].into_iter(), vec![ Row::StyledData(["Row11", "Row12", "Row13"].into_iter(), row_style), Row::StyledData(["Row21", "Row22", "Row23"].into_iter(), row_style), Row::StyledData(["Row31", "Row32", "Row33"].into_iter(), row_style), Row::Data(["Row41", "Row42", "Row43"].into_iter()) ].into_iter() ) .block(Block::default().title("Table")) .header_style(Style::default().fg(Color::Yellow)) .widths(&[5, 5, 10]) .style(Style::default().fg(Color::White)) .column_spacing(1);
Methods
impl<'a, T, H, I, D, R> Table<'a, T, H, I, D, R> where
T: Display,
H: Iterator<Item = T>,
I: Display,
D: Iterator<Item = I>,
R: Iterator<Item = Row<D, I>>,
[src]
T: Display,
H: Iterator<Item = T>,
I: Display,
D: Iterator<Item = I>,
R: Iterator<Item = Row<D, I>>,
pub fn new(header: H, rows: R) -> Table<'a, T, H, I, D, R>
[src]
pub fn block(self, block: Block<'a>) -> Table<'a, T, H, I, D, R>
[src]
pub fn header<II>(self, header: II) -> Table<'a, T, H, I, D, R> where
II: IntoIterator<Item = T, IntoIter = H>,
[src]
II: IntoIterator<Item = T, IntoIter = H>,
pub fn header_style(self, style: Style) -> Table<'a, T, H, I, D, R>
[src]
pub fn widths(self, widths: &'a [u16]) -> Table<'a, T, H, I, D, R>
[src]
pub fn rows<II>(self, rows: II) -> Table<'a, T, H, I, D, R> where
II: IntoIterator<Item = Row<D, I>, IntoIter = R>,
[src]
II: IntoIterator<Item = Row<D, I>, IntoIter = R>,
pub fn style(self, style: Style) -> Table<'a, T, H, I, D, R>
[src]
pub fn column_spacing(self, spacing: u16) -> Table<'a, T, H, I, D, R>
[src]
Trait Implementations
impl<'a, T, H, I, D, R> Widget for Table<'a, T, H, I, D, R> where
T: Display,
H: Iterator<Item = T>,
I: Display,
D: Iterator<Item = I>,
R: Iterator<Item = Row<D, I>>,
[src]
T: Display,
H: Iterator<Item = T>,
I: Display,
D: Iterator<Item = I>,
R: Iterator<Item = Row<D, I>>,
fn draw(&mut self, area: Rect, buf: &mut Buffer)
[src]
fn background(&self, area: Rect, buf: &mut Buffer, color: Color)
[src]
fn render<B>(&mut self, f: &mut Frame<B>, area: Rect) where
Self: Sized,
B: Backend,
[src]
Self: Sized,
B: Backend,
impl<'a, T, H, I, D, R> Default for Table<'a, T, H, I, D, R> where
T: Display,
H: Iterator<Item = T> + Default,
I: Display,
D: Iterator<Item = I>,
R: Iterator<Item = Row<D, I>> + Default,
[src]
T: Display,
H: Iterator<Item = T> + Default,
I: Display,
D: Iterator<Item = I>,
R: Iterator<Item = Row<D, I>> + Default,
Auto Trait Implementations
impl<'a, T, H, I, D, R> Send for Table<'a, T, H, I, D, R> where
H: Send,
R: Send,
H: Send,
R: Send,
impl<'a, T, H, I, D, R> Sync for Table<'a, T, H, I, D, R> where
H: Sync,
R: Sync,
H: Sync,
R: Sync,
impl<'a, T, H, I, D, R> Unpin for Table<'a, T, H, I, D, R> where
H: Unpin,
R: Unpin,
H: Unpin,
R: Unpin,
impl<'a, T, H, I, D, R> UnwindSafe for Table<'a, T, H, I, D, R> where
H: UnwindSafe,
R: UnwindSafe,
H: UnwindSafe,
R: UnwindSafe,
impl<'a, T, H, I, D, R> RefUnwindSafe for Table<'a, T, H, I, D, R> where
H: RefUnwindSafe,
R: RefUnwindSafe,
H: RefUnwindSafe,
R: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,