[−][src]Function tbot::spawn
pub fn spawn<F>(future: F) -> Spawn where
F: Future<Error = ()> + Send + 'static,
A wrapper around tokio::spawn
without F::Item: ()
.
When calling an API method, you'll most likely throw away its result.
However, tokio
requires that F::Item
be ()
. tbot
provides
a thin wrapper around tokio::spawn
that maps F::Item
to ()
.
On the other hand, tbot
still requires that you handle possible errors
properly before running a future.