pub struct ButtonBuilder { /* private fields */ }Expand description
Builder for a Button component.
Required: label (String), on_tap (ActionRef).
Optional: variant, icon, disabled, loading.
Implementations§
Source§impl ButtonBuilder
impl ButtonBuilder
Sourcepub fn new(label: impl Into<String>, on_tap: PropValue) -> Self
pub fn new(label: impl Into<String>, on_tap: PropValue) -> Self
Create a new ButtonBuilder with required props.
on_tap must be a PropValue::ActionRef — use PropValue::action() or
PropValue::action_with_args().
pub fn variant(self, variant: ButtonVariant) -> Self
pub fn icon(self, icon: impl Into<String>) -> Self
pub fn disabled(self, disabled: bool) -> Self
pub fn loading(self, loading: bool) -> Self
pub fn build(self) -> SurfaceNode
Auto Trait Implementations§
impl Freeze for ButtonBuilder
impl RefUnwindSafe for ButtonBuilder
impl Send for ButtonBuilder
impl Sync for ButtonBuilder
impl Unpin for ButtonBuilder
impl UnwindSafe for ButtonBuilder
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