pub struct ElementDeclaration<CustomElementData: Clone + Default + Debug = ()> {Show 17 fields
pub layout: LayoutConfig,
pub background_color: Color,
pub corner_radius: CornerRadius,
pub aspect_ratio: f32,
pub image_data: Option<ImageSource>,
pub floating: FloatingConfig,
pub custom_data: Option<CustomElementData>,
pub clip: ClipConfig,
pub border: BorderConfig,
pub user_data: usize,
pub effects: Vec<ShaderConfig>,
pub shaders: Vec<ShaderConfig>,
pub visual_rotation: Option<VisualRotationConfig>,
pub shape_rotation: Option<ShapeRotationConfig>,
pub accessibility: Option<AccessibilityConfig>,
pub text_input: Option<TextInputConfig>,
pub preserve_focus: bool,
}Expand description
The top-level element declaration.
Fields§
§layout: LayoutConfig§background_color: Color§corner_radius: CornerRadius§aspect_ratio: f32§image_data: Option<ImageSource>§floating: FloatingConfig§custom_data: Option<CustomElementData>§clip: ClipConfig§border: BorderConfig§user_data: usize§effects: Vec<ShaderConfig>§shaders: Vec<ShaderConfig>§visual_rotation: Option<VisualRotationConfig>§shape_rotation: Option<ShapeRotationConfig>§accessibility: Option<AccessibilityConfig>§text_input: Option<TextInputConfig>§preserve_focus: boolTrait Implementations§
Source§impl<CustomElementData: Clone + Clone + Default + Debug> Clone for ElementDeclaration<CustomElementData>
impl<CustomElementData: Clone + Clone + Default + Debug> Clone for ElementDeclaration<CustomElementData>
Source§fn clone(&self) -> ElementDeclaration<CustomElementData>
fn clone(&self) -> ElementDeclaration<CustomElementData>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<CustomElementData> Freeze for ElementDeclaration<CustomElementData>where
CustomElementData: Freeze,
impl<CustomElementData> RefUnwindSafe for ElementDeclaration<CustomElementData>where
CustomElementData: RefUnwindSafe,
impl<CustomElementData> Send for ElementDeclaration<CustomElementData>where
CustomElementData: Send,
impl<CustomElementData> Sync for ElementDeclaration<CustomElementData>where
CustomElementData: Sync,
impl<CustomElementData> Unpin for ElementDeclaration<CustomElementData>where
CustomElementData: Unpin,
impl<CustomElementData> UnsafeUnpin for ElementDeclaration<CustomElementData>where
CustomElementData: UnsafeUnpin,
impl<CustomElementData> UnwindSafe for ElementDeclaration<CustomElementData>where
CustomElementData: UnwindSafe,
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