pub struct CallbackWithContext<F: ?Sized> { /* private fields */ }Expand description
This is a reusable callback type, useful in contexts where a callback must be received from the user which will later be invoked with specific arguments.
Implementations§
Source§impl<F: ?Sized> CallbackWithContext<F>
impl<F: ?Sized> CallbackWithContext<F>
pub fn new( callback: impl Into<CallbackWithContext<F>>, ) -> CallbackWithContext<F>
Trait Implementations§
Source§impl<F: ?Sized> Clone for CallbackWithContext<F>
impl<F: ?Sized> Clone for CallbackWithContext<F>
Source§impl<F: ?Sized> Debug for CallbackWithContext<F>
impl<F: ?Sized> Debug for CallbackWithContext<F>
Source§impl<F: ?Sized> Deref for CallbackWithContext<F>
impl<F: ?Sized> Deref for CallbackWithContext<F>
Source§impl From<&CallbackWithContext<Function>> for Function
impl From<&CallbackWithContext<Function>> for Function
Source§fn from(callback_with_context: &CallbackWithContext<Function>) -> Self
fn from(callback_with_context: &CallbackWithContext<Function>) -> Self
Converts to this type from the input type.
Source§impl From<CallbackWithContext<Function>> for Function
impl From<CallbackWithContext<Function>> for Function
Source§fn from(callback_with_context: CallbackWithContext<Function>) -> Self
fn from(callback_with_context: CallbackWithContext<Function>) -> Self
Converts to this type from the input type.
Source§impl<F: Sized> From<F> for CallbackWithContext<F>
impl<F: Sized> From<F> for CallbackWithContext<F>
Source§impl<F: ?Sized> Hash for CallbackWithContext<F>
impl<F: ?Sized> Hash for CallbackWithContext<F>
Source§impl<F: ?Sized> Ord for CallbackWithContext<F>
impl<F: ?Sized> Ord for CallbackWithContext<F>
Source§impl<F: ?Sized> PartialEq for CallbackWithContext<F>
impl<F: ?Sized> PartialEq for CallbackWithContext<F>
Source§impl<F: ?Sized> PartialOrd for CallbackWithContext<F>
impl<F: ?Sized> PartialOrd for CallbackWithContext<F>
impl<F: ?Sized> Eq for CallbackWithContext<F>
Auto Trait Implementations§
impl<F> Freeze for CallbackWithContext<F>where
F: ?Sized,
impl<F> RefUnwindSafe for CallbackWithContext<F>where
F: RefUnwindSafe + ?Sized,
impl<F> !Send for CallbackWithContext<F>
impl<F> !Sync for CallbackWithContext<F>
impl<F> Unpin for CallbackWithContext<F>where
F: ?Sized,
impl<F> UnwindSafe for CallbackWithContext<F>where
F: RefUnwindSafe + ?Sized,
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