pub struct RoutedEventObservable { /* private fields */ }Expand description
The stream of (sender, args) notifications of a routed event: one for
every element on the route of every raise. This is what class handlers
are built on.
Implementations§
Source§impl RoutedEventObservable
impl RoutedEventObservable
Sourcepub fn subscribe(
&'static self,
handler: impl Fn(&Interactive, &dyn IRoutedEventArgs) + 'static,
) -> Rc<dyn IDisposable>
pub fn subscribe( &'static self, handler: impl Fn(&Interactive, &dyn IRoutedEventArgs) + 'static, ) -> Rc<dyn IDisposable>
Subscribes to the notifications. Disposing the returned handle unsubscribes.
Sourcepub fn has_observers(&self) -> bool
pub fn has_observers(&self) -> bool
Whether there is any subscriber.
Auto Trait Implementations§
impl !Freeze for RoutedEventObservable
impl !RefUnwindSafe for RoutedEventObservable
impl !Send for RoutedEventObservable
impl !Sync for RoutedEventObservable
impl !UnwindSafe for RoutedEventObservable
impl Unpin for RoutedEventObservable
impl UnsafeUnpin for RoutedEventObservable
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