#[repr(transparent)]pub struct FocusId(_);
Implementations§
source§impl FocusId
impl FocusId
sourcepub fn is_focused(&self, cx: &WindowContext<'_>) -> bool
pub fn is_focused(&self, cx: &WindowContext<'_>) -> bool
Obtains whether the element associated with this handle is currently focused.
sourcepub fn contains_focused(&self, cx: &WindowContext<'_>) -> bool
pub fn contains_focused(&self, cx: &WindowContext<'_>) -> bool
Obtains whether the element associated with this handle contains the focused element or is itself focused.
sourcepub fn within_focused(&self, cx: &WindowContext<'_>) -> bool
pub fn within_focused(&self, cx: &WindowContext<'_>) -> bool
Obtains whether the element associated with this handle is contained within the focused element or is itself focused.
Trait Implementations§
source§impl Key for FocusId
impl Key for FocusId
source§fn null() -> Self
fn null() -> Self
Creates a new key that is always invalid and distinct from any non-null
key. A null key can only be created through this method (or default
initialization of keys made with
new_key_type!
, which calls this
method). Read moresource§impl Ord for FocusId
impl Ord for FocusId
source§impl PartialEq<FocusId> for FocusId
impl PartialEq<FocusId> for FocusId
source§impl PartialOrd<FocusId> for FocusId
impl PartialOrd<FocusId> for FocusId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for FocusId
impl Eq for FocusId
impl StructuralEq for FocusId
impl StructuralPartialEq for FocusId
Auto Trait Implementations§
impl RefUnwindSafe for FocusId
impl Send for FocusId
impl Sync for FocusId
impl Unpin for FocusId
impl UnwindSafe for FocusId
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.