pub fn resource<S, T, Fut>( source: impl Fn() -> S + 'static, fetch: impl Fn(S) -> Fut + 'static, ) -> Resource<T>where S: Clone + PartialEq + 'static, T: 'static, Fut: Future<Output = T> + 'static,
Creates a Resource in the current thread’s default reactor.
Resource
See Resource for semantics.