pub struct CallbackHolder { /* private fields */ }Expand description
CallbackHolder keeps the latest callback closure alive across recompositions. It stores the callback in an Rc<RefCell<…>> so that the composer can hand out lightweight forwarder closures without cloning the underlying callback value.
Implementations§
Trait Implementations§
Source§impl Clone for CallbackHolder
impl Clone for CallbackHolder
Source§fn clone(&self) -> CallbackHolder
fn clone(&self) -> CallbackHolder
Returns a duplicate of the value. Read more
1.0.0 · 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 CallbackHolder
impl !RefUnwindSafe for CallbackHolder
impl !Send for CallbackHolder
impl !Sync for CallbackHolder
impl Unpin for CallbackHolder
impl !UnwindSafe for CallbackHolder
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