pub trait AsyncHandler<State, Sig>:
Send
+ Sync
+ 'static{
// Required methods
fn declaration(export_name: &str) -> String;
fn inject_async(
self,
engine: &mut Engine<State>,
export_name: &str,
) -> Result<(), EngineError>;
// Provided method
fn declaration_for(&self, export_name: &str) -> String { ... }
}Required Methods§
fn declaration(export_name: &str) -> String
fn inject_async( self, engine: &mut Engine<State>, export_name: &str, ) -> Result<(), EngineError>
Provided Methods§
fn declaration_for(&self, export_name: &str) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.