Struct arret_runtime::boxed::FunThunk[][src]

#[repr(C, align(16))]
pub struct FunThunk { /* fields omitted */ }

Boxed function value with optional captures

This is typically used in places where functions are used as values or stored in collections. For example, placing a function in a list will create a FunThunk. When taking an function as a parameter to an RFI function it’s typically better to use a typed callback::Callback.

Implementations

impl FunThunk[src]

pub fn new(
    heap: &mut impl AsHeap,
    captures: Captures,
    entry: ThunkEntry
) -> Gc<FunThunk>
[src]

Constructs a new function value with the given captures and entry point

pub fn size() -> BoxSize[src]

Returns the box size for functions

pub fn apply(&self, task: &mut Task, arg_list: Gc<Any>) -> Gc<Any>[src]

Applies this function on the passed task with the given arguments

Trait Implementations

impl Boxed for FunThunk[src]

impl ConstTagged for FunThunk[src]

impl Debug for FunThunk[src]

impl DistinctTagged for FunThunk[src]

impl Hash for FunThunk[src]

impl PartialEq<FunThunk> for FunThunk[src]

impl Eq for FunThunk[src]

impl UniqueTagged for FunThunk[src]

Auto Trait Implementations

impl RefUnwindSafe for FunThunk

impl !Send for FunThunk

impl !Sync for FunThunk

impl Unpin for FunThunk

impl UnwindSafe for FunThunk

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> EncodeBoxedAbiType for T where
    T: UniqueTagged
[src]

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

impl<T> HashInHeap for T where
    T: Hash
[src]

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

impl<T> PartialEqInHeap for T where
    T: PartialEq<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> 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.