Skip to main content

SystemParam

Trait SystemParam 

Source
pub trait SystemParam: Sized {
    type State: Default + Send + Sync + 'static;

    // Required method
    fn init_state(world: &mut World) -> Self::State;
}
Expand description

Types extractable from a World as system parameters.

Required Associated Types§

Source

type State: Default + Send + Sync + 'static

Per-system persistent state.

Required Methods§

Source

fn init_state(world: &mut World) -> Self::State

Initialises state from the world.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§