pub fn create_local_resource_with_initial_value<S, T, Fu>(
cx: Scope,
source: impl Fn() -> S + 'static,
fetcher: impl Fn(S) -> Fu + 'static,
initial_value: Option<T>
) -> Resource<S, T>where
S: PartialEq + Debug + Clone + 'static,
T: 'static,
Fu: Future<Output = T> + 'static,
Expand description
Creates a local Resource with the given initial value,
which will only generate and run a Future using the fetcher
when the
source
changes.
Unlike create_resource_with_initial_value(), this Future will always run on the local system and therefore its output type does not need to be Serializable.