[][src]Function moxie::load

pub fn load<Arg: ?Sized, Input, Fut, Output>(
    capture: &Arg,
    init: impl FnOnce(&Input) -> Fut
) -> Poll<Output> where
    Arg: PartialEq<Input> + ToOwned<Owned = Input>,
    Input: Borrow<Arg> + 'static,
    Fut: Future<Output = Output> + 'static,
    Output: Clone + 'static, 

Load a value from a future, cloning it on subsequent revisions after it is first returned. Re-initializes the loading future if the capture argument changes from previous revisions.

Environment Expectations

This function requires the following types to be visible to illicit::get and will panic otherwise: