pub struct Event<TEventArgs = ()> { /* private fields */ }
Expand description
An event registration.
Implementations§
Source§impl<TEventArgs> Event<TEventArgs>
impl<TEventArgs> Event<TEventArgs>
pub fn new() -> Selfwhere
TEventArgs: Clone,
pub fn add_fn<T>(&self, handler: T) -> Result<EventHandle<TEventArgs>, String>
pub fn add_fnonce<T>( &self, handler: T, ) -> Result<EventHandle<TEventArgs>, String>
pub fn add_ptr( &self, handler: FnEventHandlerDelegate<TEventArgs>, ) -> Result<EventHandle<TEventArgs>, String>
Trait Implementations§
impl<TEventArgs: Send + Sync> Sync for Event<TEventArgs>
Auto Trait Implementations§
impl<TEventArgs> Freeze for Event<TEventArgs>
impl<TEventArgs> RefUnwindSafe for Event<TEventArgs>
impl<TEventArgs> Send for Event<TEventArgs>
impl<TEventArgs> Unpin for Event<TEventArgs>
impl<TEventArgs> UnwindSafe for Event<TEventArgs>
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