Struct await_tree::AnyKey
source · pub struct AnyKey(/* private fields */);
Expand description
Type-erased key for the Registry
.
Implementations§
source§impl AnyKey
impl AnyKey
sourcepub fn is<K: Any>(&self) -> bool
pub fn is<K: Any>(&self) -> bool
Returns whether the key is of type K
.
Equivalent to self.as_any().is::<K>()
.
sourcepub fn is_anonymous(&self) -> bool
pub fn is_anonymous(&self) -> bool
Returns whether the key corresponds to an anonymous await-tree.
sourcepub fn downcast_ref<K: Any>(&self) -> Option<&K>
pub fn downcast_ref<K: Any>(&self) -> Option<&K>
Returns the key as a reference to type K
, if it is of type K
.
Equivalent to self.as_any().downcast_ref::<K>()
.
Trait Implementations§
source§impl PartialEq for AnyKey
impl PartialEq for AnyKey
impl Eq for AnyKey
Auto Trait Implementations§
impl Freeze for AnyKey
impl !RefUnwindSafe for AnyKey
impl Send for AnyKey
impl Sync for AnyKey
impl Unpin for AnyKey
impl !UnwindSafe for AnyKey
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