pub fn with_defaults(layout: &TableLayout) -> Self {
        // try to get the column default
        let column_value = layout.column_defaults.get(&layout.column);
        if column_value.is_some() {
            return (*column_value.unwrap()).clone();
        }

        // try to get the row default
        let row_value = layout.row_defaults.get(&layout.row);
        if row_value.is_some() {
            return (*row_value.unwrap()).clone();
        }

        // just get the default i guess
        CellProperties{..layout.cell_defaults.clone()}
    }
/// Inherits the default settings as determined by a
/// `TableLayout`. Will first try to match the defaults for the
/// column this would be added to, then the row, then the fallback
/// defaults. Note that these defaults apply only if the cell
/// was added next and if the defaults have not been changed
/// since. The correct use of `with_defaults` is to initialize
/// `CellProperties` for immediate insertion to a layout.
Inherits the default settings as determined by a
`TableLayout`. Will first try to match the defaults for the
column this would be added to, then the row, then the fallback
defaults. Note that these defaults apply only if the cell
was added next and if the defaults have not been changed
since. The correct use of `with_defaults` is to initialize
`CellProperties` for immediate insertion to a layout.
Inherits the default settings as determined by a ` TableLayout ` . Will first try to match the defaults for the column this would be added to then the row then the fallback defaults . Note that these defaults apply only if the cell was added next and if the defaults have not been changed since . The correct use of ` with_defaults ` is to initialize ` CellProperties ` for immediate insertion to a layout .
pub fn with_defaults(layout: &TableLayout) -> Self {
        // try to get the column default
        let column_value = layout.column_defaults.get(&layout.column);
        if column_value.is_some() {
            return (*column_value.unwrap()).clone();
        }
        // try to get the row default
        let row_value = layout.row_defaults.get(&layout.row);
        if row_value.is_some() {
            return (*row_value.unwrap()).clone();
        }
        // just get the default i guess
        CellProperties{..layout.cell_defaults.clone()}
    }
pub fn with_defaults ( layout : & TableLayout ) -> Self { // try to get the column default let column_value = layout . column_defaults . get ( & layout . column ) ; if column_value . is_some ( ) { return ( * column_value . unwrap ( ) ) . clone ( ) ; } // try to get the row default let row_value = layout . row_defaults . get ( & layout . row ) ; if row_value . is_some ( ) { return ( * row_value . unwrap ( ) ) . clone ( ) ; } // just get the default i guess CellProperties { .. layout . cell_defaults . clone ( ) } }
Inherits the default settings as determined by a
`TableLayout`.
Inherits the default settings as determined by a ` TableLayout ` .
layout
&TableLayout
layout
&TableLayout