Type Alias ambient_element::DespawnFn

source ·
pub type DespawnFn = Box<dyn FnOnce(&mut World) + Sync + Send>;
Expand description

The return type of a function passed to use_spawn. This function is called when the Element is unmounted/despawned; use it to clean up any resources.

Aliased Type§

struct DespawnFn(/* private fields */);