pub struct Table<const W: usize, T> { /* private fields */ }
Implementations§
Source§impl<const W: usize, T: Cell> Table<W, T>
impl<const W: usize, T: Cell> Table<W, T>
pub fn new(opts: TableOptions) -> Self
pub fn size(&self, parent: Constraint) -> Size
pub fn divider(&mut self)
pub fn push(&mut self, row: [T; W])
pub fn header(&mut self, row: [T; W])
pub fn extend(&mut self, rows: impl IntoIterator<Item = [T; W]>)
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<const W: usize, T: Cell + Debug + Send + Sync> Element for Table<W, T>
impl<const W: usize, T: Cell + Debug + Send + Sync> Element for Table<W, T>
Source§fn size(&self, parent: Constraint) -> Size
fn size(&self, parent: Constraint) -> Size
Get the size of the element, in rows and columns.
Source§fn render(&self, parent: Constraint) -> Vec<Line>
fn render(&self, parent: Constraint) -> Vec<Line>
Render the element as lines of text that can be printed.
Source§fn columns(&self, parent: Constraint) -> usize
fn columns(&self, parent: Constraint) -> usize
Get the number of columns occupied by this element.
Source§fn rows(&self, parent: Constraint) -> usize
fn rows(&self, parent: Constraint) -> usize
Get the number of rows occupied by this element.
Source§fn write(&self, constraints: Constraint) -> Result<()>where
Self: Sized,
fn write(&self, constraints: Constraint) -> Result<()>where
Self: Sized,
Write using the given constraints to
stdout
.Source§fn display(&self, constraints: Constraint) -> String
fn display(&self, constraints: Constraint) -> String
Return a string representation of this element.
Auto Trait Implementations§
impl<const W: usize, T> Freeze for Table<W, T>
impl<const W: usize, T> RefUnwindSafe for Table<W, T>where
T: RefUnwindSafe,
impl<const W: usize, T> Send for Table<W, T>where
T: Send,
impl<const W: usize, T> Sync for Table<W, T>where
T: Sync,
impl<const W: usize, T> Unpin for Table<W, T>where
T: Unpin,
impl<const W: usize, T> UnwindSafe for Table<W, T>where
T: UnwindSafe,
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