term/table: Add Table::with_opts() to set options after Table obj was constructed

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2025-09-07 13:09:26 +02:00 committed by Lorenz Leutgeb
parent fb458537b4
commit 016cab1dbf
1 changed files with 5 additions and 0 deletions

View File

@ -182,6 +182,11 @@ impl<const W: usize, T: Cell> Table<W, T> {
}
}
pub fn with_opts(mut self, opts: TableOptions) -> Self {
self.opts = opts;
self
}
pub fn size(&self, parent: Constraint) -> Size {
self.outer(parent)
}