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]
impl FunThunk
[src]pub fn new(
heap: &mut impl AsHeap,
captures: Captures,
entry: ThunkEntry
) -> Gc<FunThunk>
[src]
heap: &mut impl AsHeap,
captures: Captures,
entry: ThunkEntry
) -> Gc<FunThunk>
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 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> EncodeBoxedAbiType for T where
T: UniqueTagged,
[src]
impl<T> EncodeBoxedAbiType for T where
T: UniqueTagged,
[src]pub const BOXED_ABI_TYPE: BoxedAbiType
[src]
impl<T> HashInHeap for T where
T: Hash,
[src]
impl<T> HashInHeap for T where
T: Hash,
[src]impl<T> PartialEqInHeap for T where
T: PartialEq<T>,
[src]
impl<T> PartialEqInHeap for T where
T: PartialEq<T>,
[src]