Skip to main content

remember_auto

Function remember_auto 

Source
pub fn remember_auto<T: 'static>(slot: &str, init: impl FnOnce() -> T) -> Rc<T>
Expand description

Auto-keyed variant of remember: identity is the call site plus an occurrence index, so state follows a composition position, not an item. Only safe where the number of calls at this site is fixed across frames — list items and conditional branches need remember_with_key.