Trait rune::alloc::callable::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 Budget<T>
where T: Callable,

§

type Output = <T as Callable>::Output

source§

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

§

type Output = <T as Callable>::Output

source§

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

Blanket implementation for closures.

§

type Output = O