Skip to main content

button_labelled

Function button_labelled 

Source
pub fn button_labelled(
    label: &ViewHandle,
    action: impl Fn() + 'static,
) -> ViewHandle
Expand description

Button(action:label:) — a button whose label is a view rather than a string.

The action is an escaping () -> Void, so its context is leaked; the label closure is @noescape and resolved during the call, so that context can live on this frame.