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.
Source§impl NativeEventHandler
impl NativeEventHandler
pub fn get_event_name(&self) -> &'static str
pub fn get_mut_event_name(&mut self) -> &mut &'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 moreSource§impl Debug for NativeEventHandler
impl Debug for NativeEventHandler
Source§impl IntoEventProp for NativeEventHandler
Converts an owned NativeEventHandler into Option<NativeEventHandler>.
impl IntoEventProp for NativeEventHandler
Converts an owned NativeEventHandler into Option<NativeEventHandler>.
Source§fn into_event_prop(self) -> Option<NativeEventHandler>
fn into_event_prop(self) -> Option<NativeEventHandler>
Auto 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