pub trait AppLabel: 'static + Send + Sync + Debug {
// Required methods
fn dyn_clone(&self) -> Box<dyn AppLabel>;
fn as_dyn_eq(&self) -> &(dyn DynEq + 'static);
fn dyn_hash(&self, state: &mut dyn Hasher);
// Provided method
fn intern(&self) -> Interned<dyn AppLabel>
where Self: Sized { ... }
}
Expand description
A strongly-typed class of labels used to identify an App
.
Casts this value to a form where it can be compared with other type-erased values.
Feeds this value into the given [Hasher
].
Returns an Interned
value corresponding to self
.
Creates a static reference to self
, possibly leaking memory.
Returns true
if the two references point to the same value.
Feeds the reference to the hasher.
This method tests for self
and other
values to be equal, and is used
by ==
.
This method tests for !=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.