#[non_exhaustive]pub struct ButtonConfig {
pub label: AnyView,
pub action: BoxHandler<()>,
pub style: ButtonStyle,
}Expand description
Configuration for a button component.
Use the Button struct’s methods to customize these properties.
§Layout Behavior
Buttons size themselves to fit their label content and never stretch to fill extra space. In a stack, they take only the space they need.
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.label: AnyViewThe label displayed on the button
action: BoxHandler<()>The action to execute when the button is clicked
style: ButtonStyleThe visual style of the button
Trait Implementations§
Source§impl Debug for ButtonConfig
impl Debug for ButtonConfig
Source§impl NativeView for ButtonConfig
impl NativeView for ButtonConfig
Source§fn stretch_axis(&self) -> StretchAxis
fn stretch_axis(&self) -> StretchAxis
Which axis (or axes) this view stretches to fill available space.
Auto Trait Implementations§
impl Freeze for ButtonConfig
impl !RefUnwindSafe for ButtonConfig
impl !Send for ButtonConfig
impl !Sync for ButtonConfig
impl Unpin for ButtonConfig
impl !UnwindSafe for ButtonConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more