RoutedEventRegistry
struct · ferroui-base · v0.5.0
struct RoutedEventRegistry
Tracks registered routed events.
Like routed event definitions, the registry is per-thread.
Members
new
fn new() -> Self
Creates an empty registry.
instance
fn instance() -> &'static RoutedEventRegistry
The routed event registry instance of the current thread.
register
fn register<T: ?Sized>(self: &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.
get_all_registered
fn get_all_registered(self: &Self) -> Vec<RoutedEvent>
Returns all routed events registered with the registry.
get_registered
fn get_registered(self: &Self, type_: &'static TypeInfo) -> Vec<RoutedEvent>
Returns the routed events registered on a type.
get_registered_for
fn get_registered_for<TOwner: StaticType>(self: &Self) -> Vec<RoutedEvent>
Returns the routed events registered on class TOwner.
find_by_name
fn find_by_name(self: &Self, owner: &'static TypeInfo, name: &str) -> Option<RoutedEvent>
Finds the routed event named name that owner or one of its base
classes registers, nearest class first: the lookup of the routed
event behind an event name of the managed original (the static
<Name>Event field of the class or of a base class, found by
reflection).
The comparison is case-sensitive. name is the name of the event
("Click") or of the field that holds it ("ClickEvent"): on each
class an event of exactly that name is preferred, then the name
without the Event suffix.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.