This commit is contained in:
Richard Dodd 2019-01-05 14:37:39 +00:00
parent c849ef3cf4
commit 25ac4549a0

View File

@ -378,7 +378,14 @@ fn _future_to_promise(future: Box<Future<Item = JsValue, Error = JsValue>>) -> P
}
}
/// Spawns a future.
/// Converts a Rust `Future` on a local task queue.
///
/// The `future` provided must adhere to `'static` because it'll be scheduled
/// to run in the background and cannot contain any stack references.
///
/// # Panics
///
/// This function has the same panic behavior as `future_to_promise`.
pub fn spawn_local<F>(future: F)
where
F: Future<Item = (), Error = ()> + 'static,