mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-29 14:30:31 +08:00
lib: Fix column spacing
This commit is contained in:
@@ -95,6 +95,26 @@ impl<'a> Column<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Spacing(u16);
|
||||
|
||||
impl From<u16> for Spacing {
|
||||
fn from(value: u16) -> Self {
|
||||
Self(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Spacing {
|
||||
fn default() -> Self {
|
||||
Self(0)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Spacing> for u16 {
|
||||
fn from(spacing: Spacing) -> Self {
|
||||
spacing.0
|
||||
}
|
||||
}
|
||||
|
||||
/// Needs to be implemented for items that are supposed to be rendered in tables.
|
||||
pub trait ToRow<const W: usize> {
|
||||
fn to_row(&self) -> [Cell; W];
|
||||
|
||||
Reference in New Issue
Block a user