Skip to main content

IntoExternalFunction

Trait IntoExternalFunction 

Source
pub trait IntoExternalFunction<C, Args, Return>:
    External<C, Args, Return>
    + Send
    + Sync
    + 'static
where C: HostSchema,
{ }
Expand description

A callback accepted by crate::HostFunction::external or crate::HostFunction::nondeterministic.

Implemented automatically for matching closures and function pointers. This sealed trait can be used as a generic bound.

Implementors§

Source§

impl<C: HostSchema, Args, Return, F> IntoExternalFunction<C, Args, Return> for F
where F: External<C, Args, Return> + Send + Sync + 'static,