tree_table/types/
table_cell.rs1use super::cell_props::CellProps;
2use super::val::Val;
3
4#[cfg_attr(feature = "tsify", derive(tsify::Tsify))]
5#[cfg_attr(feature = "tsify", tsify(from_wasm_abi))]
6#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
7#[derive(Debug, Clone, PartialEq)]
8pub struct TableCell {
9 pub val: Val,
10 pub props: Option<CellProps>,
11}
12
13impl TableCell {
14 pub fn new(val: Val) -> Self {
15 Self { val, props: None }
16 }
17}
18
19impl Default for TableCell {
20 fn default() -> Self {
21 TableCell::new(Val::Nil(()))
22 }
23}