#[non_exhaustive]pub struct GridLayout {
pub columns: Vec<ColumnLayout>,
pub sort: Vec<SortLayout>,
pub group_by: Vec<String>,
pub filters: Vec<FilterLayout>,
pub search: String,
pub group_panel: bool,
pub page_size: Option<usize>,
pub summaries: Vec<SummaryLayout>,
}Expand description
Everything about how a grid is arranged: its columns in order, sorting, groups, filters and search. Turn it into JSON to keep it.
use ravenrs_widgets::GridLayout;
let kept = GridLayout::default().to_json();
assert_eq!(GridLayout::from_json(&kept), Ok(GridLayout::default()));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.columns: Vec<ColumnLayout>The columns, in the order they are shown.
sort: Vec<SortLayout>Sorted columns, in priority order.
group_by: Vec<String>Grouped columns by title, outermost first.
filters: Vec<FilterLayout>Filters by column.
search: StringWhat is being searched for.
group_panel: boolThe space to drop columns on and group by them is showing.
page_size: Option<usize>Rows on a page, when it is in pages.
summaries: Vec<SummaryLayout>What each column sums up in group rows and in the footer.
Implementations§
Trait Implementations§
Source§impl Clone for GridLayout
impl Clone for GridLayout
Source§fn clone(&self) -> GridLayout
fn clone(&self) -> GridLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GridLayout
impl Debug for GridLayout
Source§impl Default for GridLayout
impl Default for GridLayout
Source§fn default() -> GridLayout
fn default() -> GridLayout
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GridLayoutwhere
GridLayout: Default,
impl<'de> Deserialize<'de> for GridLayoutwhere
GridLayout: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GridLayout, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GridLayout, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GridLayout
impl PartialEq for GridLayout
Source§impl Serialize for GridLayout
impl Serialize for GridLayout
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for GridLayout
Auto Trait Implementations§
impl Freeze for GridLayout
impl RefUnwindSafe for GridLayout
impl Send for GridLayout
impl Sync for GridLayout
impl Unpin for GridLayout
impl UnsafeUnpin for GridLayout
impl UnwindSafe for GridLayout
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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