pub trait ContextWebApiExt {
// Required methods
fn setup_web_api(&mut self, port: u16) -> Result<String, IxaError>;
fn schedule_web_api(&mut self, t: f64);
fn add_web_api_handler(
&mut self,
name: &str,
handler: impl Fn(&mut Context, Value) -> Result<Value, IxaError> + 'static,
) -> Result<(), IxaError>;
}
Required Methods§
Sourcefn schedule_web_api(&mut self, t: f64)
fn schedule_web_api(&mut self, t: f64)
Schedule the simulation to pause at time t and listen for requests from the Web API.
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.