Trait nvim_rs::create::Spawner [−][src]
pub trait Spawner: Handler {
type Handle;
fn spawn<Fut>(&self, future: Fut) -> Self::Handle
where
Fut: Future<Output = ()> + Send + 'static;
}
Expand description
A task to generalize spawning a future that returns ()
.
If you use one of the features use_tokio
or use_async-std
, this will
automatically be implemented on you
Handler
using the appropriate runtime.
If you have a runtime that brings appropriate types, you can implement this
on your [
Handler](crate::rpc::handler::Handler) and use [
Neovim::new`](crate::neovim::Neovim::new) to connect to neovim.