[][src]Function moxie::state::memo_state

pub fn memo_state<Arg, Init, Output>(arg: Arg, initializer: Init) -> Key<Output> where
    Arg: PartialEq + 'static,
    Output: 'static,
    Init: FnOnce(&'a Arg) -> Output, 

Root a state variable at this callsite, returning a Key to the state variable. Re-initializes the state variable if the capture arg changes.