Skip to main content

run

Function run 

Source
pub fn run<F, Fut>(plugin: F) -> ExitCode
where F: FnOnce(ModuleCtx) -> Fut, Fut: Future<Output = Result<(), Error>>,
Expand description

Connects to mochid, runs plugin until it returns, and turns its result into an exit code. Runs on a single-threaded tokio runtime; to pick another, use ModuleCtx::connect from your own.