pub trait Global: Referrer + Sized + 'static {
// Provided method
fn initial() -> Self { ... }
}
Expand description
A global state that can be requested by all systems.
A global state may be a transitive owner of entity references.
Thus, all global states must implement entity::Referrer
.
Provided Methods§
sourcefn initial() -> Self
fn initial() -> Self
This method is called during world::Builder::build
if some system requests this type but this type was not provided separately.
The default implementation panics. Users are expected to override this method if a default value is intended.
Object Safety§
This trait is not object safe.