pub struct FocusRequester {
pub target: Rc<RefCell<Option<u64>>>,
}Expand description
A handle that can programmatically request focus for a widget.
Similar to Compose’s FocusRequester. Create one via remember(FocusRequester::new),
attach it via .focus_requester(...) on a modifier, and call request_focus() to
move keyboard focus to the associated widget on the next frame.
Fields§
§target: Rc<RefCell<Option<u64>>>Target view ID, set during layout/paint by the modifier system.
Implementations§
Source§impl FocusRequester
impl FocusRequester
pub fn new() -> Self
Sourcepub fn request_focus(&self)
pub fn request_focus(&self)
Request focus for the associated widget on the next frame.
Trait Implementations§
Source§impl Clone for FocusRequester
impl Clone for FocusRequester
Source§fn clone(&self) -> FocusRequester
fn clone(&self) -> FocusRequester
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Freeze for FocusRequester
impl !RefUnwindSafe for FocusRequester
impl !Send for FocusRequester
impl !Sync for FocusRequester
impl Unpin for FocusRequester
impl UnsafeUnpin for FocusRequester
impl !UnwindSafe for FocusRequester
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