Skip to main content

default_focus

Function default_focus 

Source
pub fn default_focus(
    view: &ViewHandle,
    value: bool,
    priority: DefaultFocusPriority,
) -> ViewHandle
Expand description

Apply .defaultFocus(_:_:priority:) with A == Bool.

Three arguments, all by address for the same reason: FocusState<A>.Binding and the value are generic over A, and the priority is resilient. Where focused can hand its concrete FocusState<Bool>.Binding over in three registers, a generic one cannot travel that way at all.