pub struct RoutedEventRegistry { /* private fields */ }Expand description
Tracks registered routed events.
Like routed event definitions, the registry is per-thread.
Implementations§
Source§impl RoutedEventRegistry
impl RoutedEventRegistry
Sourcepub fn instance() -> &'static RoutedEventRegistry
pub fn instance() -> &'static RoutedEventRegistry
The routed event registry instance of the current thread.
Sourcepub fn register<T: ?Sized>(
&self,
type_: &'static TypeInfo,
event: RoutedEvent<T>,
)
pub fn register<T: ?Sized>( &self, type_: &'static TypeInfo, event: RoutedEvent<T>, )
Registers a routed event on a type.
You won’t usually want to call this method directly: use
RoutedEvent::register, which calls it.
Sourcepub fn get_all_registered(&self) -> Vec<RoutedEvent>
pub fn get_all_registered(&self) -> Vec<RoutedEvent>
Returns all routed events registered with the registry.
Sourcepub fn get_registered(&self, type_: &'static TypeInfo) -> Vec<RoutedEvent>
pub fn get_registered(&self, type_: &'static TypeInfo) -> Vec<RoutedEvent>
Returns the routed events registered on a type.
Sourcepub fn get_registered_for<TOwner: StaticType>(&self) -> Vec<RoutedEvent>
pub fn get_registered_for<TOwner: StaticType>(&self) -> Vec<RoutedEvent>
Returns the routed events registered on class TOwner.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RoutedEventRegistry
impl !RefUnwindSafe for RoutedEventRegistry
impl !Send for RoutedEventRegistry
impl !Sync for RoutedEventRegistry
impl !UnwindSafe for RoutedEventRegistry
impl Unpin for RoutedEventRegistry
impl UnsafeUnpin for RoutedEventRegistry
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more