pub struct NativeEventHandler { /* private fields */ }Expand description
A wrapper around an event callback.
Stores the event name and a shared reference to the heap-allocated callback closure.
Implementations§
Source§impl NativeEventHandler
Implementation of event handler construction and invocation.
impl NativeEventHandler
Implementation of event handler construction and invocation.
Sourcepub fn create<F>(event_name: NativeEventName, callback: F) -> Self
pub fn create<F>(event_name: NativeEventName, callback: F) -> Self
Source§impl NativeEventHandler
impl NativeEventHandler
pub fn get_mut_event_name(&mut self) -> &mut Cow<'static, str>
pub fn get_mut_callback(&mut self) -> &mut Rc<RefCell<NativeEventCallbackInner>>
Trait Implementations§
Source§impl Clone for NativeEventHandler
impl Clone for NativeEventHandler
Source§fn clone(&self) -> NativeEventHandler
fn clone(&self) -> NativeEventHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NativeEventHandler
impl !RefUnwindSafe for NativeEventHandler
impl !Send for NativeEventHandler
impl !Sync for NativeEventHandler
impl Unpin for NativeEventHandler
impl UnsafeUnpin for NativeEventHandler
impl !UnwindSafe for NativeEventHandler
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