pub struct OverlayKey(/* private fields */);Expand description
The overlay registry’s own vocabulary, re-exported from frust-core so a
design system naming a band, an input class, a light-dismiss policy or a
surface identity does it through this one module: an
OverlaySlot’s setters take exactly these types, and a widget that cannot
name them cannot configure one.
An overlay owner’s identity, allocated once by the owner and quoted back to
it by every InputEvent::Overlay the
root routes into its surface.
Stable for the owner’s lifetime: an owner allocates one key when it is built and stores it, re-registering under the same key every paint. The root therefore never has to recognise an owner by position, and an owner that floats two surfaces simply holds two keys.
Implementations§
Source§impl OverlayKey
impl OverlayKey
Sourcepub fn next() -> OverlayKey
pub fn next() -> OverlayKey
Allocate a fresh key, distinct from every other key handed out on this thread.
An owner calls this once, when it is built, and stores the result — calling it per frame would hand the root a new identity every paint and break the routing it exists to enable.
Trait Implementations§
Source§impl Clone for OverlayKey
impl Clone for OverlayKey
Source§fn clone(&self) -> OverlayKey
fn clone(&self) -> OverlayKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OverlayKey
Source§impl Debug for OverlayKey
impl Debug for OverlayKey
impl Eq for OverlayKey
Source§impl Hash for OverlayKey
impl Hash for OverlayKey
Source§impl Ord for OverlayKey
impl Ord for OverlayKey
Source§fn cmp(&self, other: &OverlayKey) -> Ordering
fn cmp(&self, other: &OverlayKey) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for OverlayKey
impl PartialEq for OverlayKey
Source§impl PartialOrd for OverlayKey
impl PartialOrd for OverlayKey
impl StructuralPartialEq for OverlayKey
Auto Trait Implementations§
impl Freeze for OverlayKey
impl RefUnwindSafe for OverlayKey
impl Send for OverlayKey
impl Sync for OverlayKey
impl Unpin for OverlayKey
impl UnsafeUnpin for OverlayKey
impl UnwindSafe for OverlayKey
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.