pub struct GridElement {
pub children: Vec<WidgetElement>,
pub columns: u32,
pub spacing: Option<f64>,
pub row_spacing: Option<f64>,
pub style: ElementStyle,
}Expand description
Fixed-column grid of children.
Fields§
§children: Vec<WidgetElement>Grid cells in row-major order.
columns: u32Number of columns. Default 2.
spacing: Option<f64>Column spacing (points).
row_spacing: Option<f64>Row spacing (points).
style: ElementStyleShared visual style (padding, background, frame, …).
Trait Implementations§
Source§impl Clone for GridElement
impl Clone for GridElement
Source§fn clone(&self) -> GridElement
fn clone(&self) -> GridElement
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 GridElement
impl Debug for GridElement
Source§impl Default for GridElement
impl Default for GridElement
Source§fn default() -> GridElement
fn default() -> GridElement
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GridElement
impl<'de> Deserialize<'de> for GridElement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<GridElement> for WidgetElement
impl From<GridElement> for WidgetElement
Source§fn from(value: GridElement) -> Self
fn from(value: GridElement) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for GridElement
impl JsonSchema for GridElement
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for GridElement
impl RefUnwindSafe for GridElement
impl Send for GridElement
impl Sync for GridElement
impl Unpin for GridElement
impl UnsafeUnpin for GridElement
impl UnwindSafe for GridElement
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