pub struct Callback<T: Send + Sync> {
pub call: fn(data: &T),
pub data: T,
}
Expand description
A timer callback. The function will be called in IRQ context being passed the given data.
Note that this handler owns the data, but passes a reference to the handler. This will
typically be a SpinMutex
to allow for proper sharing with IRQ context.
Fields§
§call: fn(data: &T)
The callback function.
data: T
The data passed into the callback.
Auto Trait Implementations§
impl<T> Freeze for Callback<T>where
T: Freeze,
impl<T> RefUnwindSafe for Callback<T>where
T: RefUnwindSafe,
impl<T> Send for Callback<T>
impl<T> Sync for Callback<T>
impl<T> Unpin for Callback<T>where
T: Unpin,
impl<T> UnwindSafe for Callback<T>where
T: UnwindSafe,
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