pub trait LayoutMerge: 'static {
// Required method
fn merge(
&self,
context: &LayoutMergeContext<'_>,
saved: &GridLayout,
) -> Vec<LayoutColumn>;
}Expand description
Resolves a saved layout against the current schema. Called once per import.
The default is AppendNewColumns. An alternative could place a new
column next to its neighbour in the schema, or keep unknown columns for a
schema that depends on the user’s permissions.
Required Methods§
Sourcefn merge(
&self,
context: &LayoutMergeContext<'_>,
saved: &GridLayout,
) -> Vec<LayoutColumn>
fn merge( &self, context: &LayoutMergeContext<'_>, saved: &GridLayout, ) -> Vec<LayoutColumn>
One entry per schema column, in display order. The grid validates the result whatever the implementation returns: it adds missing columns, drops unknown ones and repeats, clamps widths, splits the order by zone and keeps one column visible.