pub struct TableThemeSpec {
pub version: u8,
pub name: Option<String>,
pub preset_id: Option<TablePresetId>,
pub padding: u8,
pub column_gap: u8,
pub row_height: u8,
pub styles: TableThemeStyleSpec,
pub effects: Vec<TableEffectRuleSpec>,
}Expand description
Serializable spec for exporting/importing table themes.
This is a pure data representation (no rendering logic) that preserves the full TableTheme surface, including effects.
Forward-compatibility notes:
- Unknown fields are rejected when
serdeis enabled (strict schema). - New fields should be optional with safe defaults to keep older exports valid.
Fields§
§version: u8Schema version for forward-compatible parsing.
name: Option<String>Optional human-readable name.
preset_id: Option<TablePresetId>Original preset identifier, if derived from a preset.
padding: u8Layout parameters.
column_gap: u8§row_height: u8§styles: TableThemeStyleSpecStyle buckets.
effects: Vec<TableEffectRuleSpec>Effects applied to the theme.
Implementations§
Source§impl TableThemeSpec
impl TableThemeSpec
Sourcepub fn from_theme(theme: &TableTheme) -> Self
pub fn from_theme(theme: &TableTheme) -> Self
Create a spec snapshot from a TableTheme.
Sourcepub fn into_theme(self) -> TableTheme
pub fn into_theme(self) -> TableTheme
Convert this spec into a TableTheme.
Sourcepub fn validate(&self) -> Result<(), TableThemeSpecError>
pub fn validate(&self) -> Result<(), TableThemeSpecError>
Validate spec ranges and sizes for safe import.
Trait Implementations§
Source§impl Clone for TableThemeSpec
impl Clone for TableThemeSpec
Source§fn clone(&self) -> TableThemeSpec
fn clone(&self) -> TableThemeSpec
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 TableThemeSpec
impl Debug for TableThemeSpec
Source§impl PartialEq for TableThemeSpec
impl PartialEq for TableThemeSpec
impl StructuralPartialEq for TableThemeSpec
Auto Trait Implementations§
impl Freeze for TableThemeSpec
impl RefUnwindSafe for TableThemeSpec
impl Send for TableThemeSpec
impl Sync for TableThemeSpec
impl Unpin for TableThemeSpec
impl UnsafeUnpin for TableThemeSpec
impl UnwindSafe for TableThemeSpec
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