Struct arret_runtime::callback::Callback[][src]

#[repr(C)]
pub struct Callback<F> where
    F: Copy
{ /* fields omitted */ }

Typed callback function

This is typically when taking a callback as a parameter to an RFI function. This is not a proper boxed value and can neither be stored in a collection or returned as a value. For those cases boxed::FunThunk should be used instead.

Implementations

impl<F> Callback<F> where
    F: Copy
[src]

pub fn captures(&self) -> Captures[src]

Returns the captures for this callback

impl<R> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures) -> R> where
    R: EncodeRetAbiType
[src]

pub fn apply(&self, task: &mut Task) -> R[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

impl<R, A> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures, _: A) -> R> where
    R: EncodeRetAbiType,
    A: EncodeAbiType
[src]

pub fn apply(&self, task: &mut Task, A: A) -> R[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

impl<R, A, B> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures, _: A, _: B) -> R> where
    R: EncodeRetAbiType,
    A: EncodeAbiType,
    B: EncodeAbiType
[src]

pub fn apply(&self, task: &mut Task, A: A, B: B) -> R[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

impl<R, A, B, C> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures, _: A, _: B, _: C) -> R> where
    R: EncodeRetAbiType,
    A: EncodeAbiType,
    B: EncodeAbiType,
    C: EncodeAbiType
[src]

pub fn apply(&self, task: &mut Task, A: A, B: B, C: C) -> R[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

impl<R, A, B, C, D> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures, _: A, _: B, _: C, _: D) -> R> where
    R: EncodeRetAbiType,
    A: EncodeAbiType,
    B: EncodeAbiType,
    C: EncodeAbiType,
    D: EncodeAbiType
[src]

pub fn apply(&self, task: &mut Task, A: A, B: B, C: C, D: D) -> R[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

impl<R, A, B, C, D, E> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures, _: A, _: B, _: C, _: D, _: E) -> R> where
    R: EncodeRetAbiType,
    A: EncodeAbiType,
    B: EncodeAbiType,
    C: EncodeAbiType,
    D: EncodeAbiType,
    E: EncodeAbiType
[src]

pub fn apply(&self, task: &mut Task, A: A, B: B, C: C, D: D, E: E) -> R[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

impl<R, A, B, C, D, E, F> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures, _: A, _: B, _: C, _: D, _: E, _: F) -> R> where
    R: EncodeRetAbiType,
    A: EncodeAbiType,
    B: EncodeAbiType,
    C: EncodeAbiType,
    D: EncodeAbiType,
    E: EncodeAbiType,
    F: EncodeAbiType
[src]

pub fn apply(&self, task: &mut Task, A: A, B: B, C: C, D: D, E: E, F: F) -> R[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

impl<R, A, B, C, D, E, F, G> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures, _: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R> where
    R: EncodeRetAbiType,
    A: EncodeAbiType,
    B: EncodeAbiType,
    C: EncodeAbiType,
    D: EncodeAbiType,
    E: EncodeAbiType,
    F: EncodeAbiType,
    G: EncodeAbiType
[src]

pub fn apply(
    &self,
    task: &mut Task,
    A: A,
    B: B,
    C: C,
    D: D,
    E: E,
    F: F,
    G: G
) -> R
[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

impl<R, A, B, C, D, E, F, G, H> Callback<for<'s> extern "C" fn(_: &'s mut Task, captures: Captures, _: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H) -> R> where
    R: EncodeRetAbiType,
    A: EncodeAbiType,
    B: EncodeAbiType,
    C: EncodeAbiType,
    D: EncodeAbiType,
    E: EncodeAbiType,
    F: EncodeAbiType,
    G: EncodeAbiType,
    H: EncodeAbiType
[src]

pub fn apply(
    &self,
    task: &mut Task,
    A: A,
    B: B,
    C: C,
    D: D,
    E: E,
    F: F,
    G: G,
    H: H
) -> R
[src]

Applies this callback inside the given Task and returns its value

It’s important that the callback was created inside the passed task or undefined behaviour may result.

Trait Implementations

impl<F: Clone> Clone for Callback<F> where
    F: Copy
[src]

impl<F> EncodeAbiType for Callback<F> where
    F: EncodeEntryPointAbiType
[src]

impl<F: Copy> Copy for Callback<F> where
    F: Copy
[src]

Auto Trait Implementations

impl<F> RefUnwindSafe for Callback<F> where
    F: RefUnwindSafe

impl<F> !Send for Callback<F>

impl<F> !Sync for Callback<F>

impl<F> Unpin for Callback<F> where
    F: Unpin

impl<F> UnwindSafe for Callback<F> where
    F: UnwindSafe

Blanket Implementations

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

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

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

impl<T> EncodeRetAbiType for T where
    T: EncodeAbiType
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> 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.