pub enum TableLayout {
Full,
Compact,
Stacked,
}Expand description
Layout style for rendering tables.
Controls spacing, borders, and overall presentation of tabular data.
§Examples
use scriba::TableLayout;
let full = TableLayout::Full; // bordered, full width
let compact = TableLayout::Compact; // minimal spacing, no borders
let stacked = TableLayout::Stacked; // key-value per row, narrow-terminal friendlyVariants§
Full
Full width with borders and padding (default).
Best for normal terminal widths, clearly delineated rows and columns.
Compact
Minimal spacing and no borders, compact display.
Good for dense data or when space is limited.
Stacked
Stacked format: one row per line with key-value pairs.
Excellent for narrow terminals, mobile output, or accessibility. Each row is displayed as:
Name: value1
Desc: description1
---Implementations§
Source§impl TableLayout
impl TableLayout
Sourcepub fn is_compact(self) -> bool
pub fn is_compact(self) -> bool
Returns true if the layout is Compact.
Sourcepub fn is_stacked(self) -> bool
pub fn is_stacked(self) -> bool
Returns true if the layout is Stacked.
Trait Implementations§
Source§impl Clone for TableLayout
impl Clone for TableLayout
Source§fn clone(&self) -> TableLayout
fn clone(&self) -> TableLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TableLayout
impl Debug for TableLayout
Source§impl Default for TableLayout
impl Default for TableLayout
Source§fn default() -> TableLayout
fn default() -> TableLayout
Returns the “default value” for a type. Read more
Source§impl PartialEq for TableLayout
impl PartialEq for TableLayout
Source§impl Serialize for TableLayout
impl Serialize for TableLayout
impl Copy for TableLayout
impl Eq for TableLayout
impl StructuralPartialEq for TableLayout
Auto Trait Implementations§
impl Freeze for TableLayout
impl RefUnwindSafe for TableLayout
impl Send for TableLayout
impl Sync for TableLayout
impl Unpin for TableLayout
impl UnsafeUnpin for TableLayout
impl UnwindSafe for TableLayout
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