rune_alloc::callable

Trait Callable

Source
pub trait Callable {
    type Output;

    // Required method
    fn call(self) -> Self::Output;
}
Expand description

A trait used for types which can be called.

This trait allows for memory limits and budgets to be combined.

Required Associated Types§

Source

type Output

Output of the callable.

Required Methods§

Source

fn call(self) -> Self::Output

Call and consume the callable.

Implementors§

Source§

impl<T> Callable for Memory<T>
where T: Callable,

Source§

impl<T, O> Callable for T
where T: FnOnce() -> O,

Blanket implementation for closures.