pub struct Callback<T: 'static> { /* private fields */ }Expand description
A type-erased, cloneable callback.
Used by components to accept event handler functions from consumers without coupling to a specific framework’s callback type.
Framework adapters convert framework-specific callbacks (e.g., Leptos
Callback, Dioxus closures) to and from this type.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Callback<T>
impl<T> !RefUnwindSafe for Callback<T>
impl<T> Send for Callback<T>
impl<T> Sync for Callback<T>
impl<T> Unpin for Callback<T>
impl<T> UnsafeUnpin for Callback<T>
impl<T> !UnwindSafe for Callback<T>
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