[][src]Struct kernel::Callback

pub struct Callback {
    app_id: AppId,
    callback_id: CallbackId,
    appdata: usize,
    fn_ptr: NonNull<*mut ()>,
}

Type for calling a callback in a process.

This is essentially a wrapper around a function pointer.

Fields

app_id: AppIdcallback_id: CallbackIdappdata: usizefn_ptr: NonNull<*mut ()>

Methods

impl Callback[src]

pub(crate) fn new(
    app_id: AppId,
    callback_id: CallbackId,
    appdata: usize,
    fn_ptr: NonNull<*mut ()>
) -> Callback
[src]

pub fn schedule(&mut self, r0: usize, r1: usize, r2: usize) -> bool[src]

Actually trigger the callback.

This will queue the Callback for the associated process. It returns false if the queue for the process is full and the callback could not be scheduled.

The arguments (r0-r2) are the values passed back to the process and are specific to the individual Driver interfaces.

Trait Implementations

impl Copy for Callback[src]

impl Clone for Callback[src]

Auto Trait Implementations

impl Unpin for Callback

impl !Send for Callback

impl !Sync for Callback

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]