pub struct FocusContext { /* private fields */ }Expand description
Per-surface focus state. The runner activates each surface’s FocusContext around its
build/event/frame, so focus never crosses windows.
Implementations§
Source§impl FocusContext
impl FocusContext
Sourcepub fn enter(&self) -> FocusGuard
pub fn enter(&self) -> FocusGuard
Makes this instance the live one until the returned guard drops, which restores the previously-active instance. Nest by keeping guards in scope; they restore in reverse order.
Trait Implementations§
Source§impl Default for FocusContext
impl Default for FocusContext
Source§impl Drop for FocusContext
impl Drop for FocusContext
Auto Trait Implementations§
impl !RefUnwindSafe for FocusContext
impl !Send for FocusContext
impl !Sync for FocusContext
impl !UnwindSafe for FocusContext
impl Freeze for FocusContext
impl Unpin for FocusContext
impl UnsafeUnpin for FocusContext
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