pub fn any_contextual_var(
context_init: impl FnMut() -> AnyVar + Send + 'static,
value_type: TypeId,
) -> AnyVarExpand description
Create a type erased contextualized variable.
The context_init closure must produce variables of the same value_type. The value type is needed to
avoid contextualizing the variable for calls of AnyVar::downcast and AnyVar::value_type that often
happen outside of the variable final context, such as in widget property capture.
See contextual_var for more details about contextualized variables.