pub trait System: 'static {
// Required method
fn run(&mut self, world: &World, resources: &Resources);
// Provided method
fn requires(&self) -> Vec<RequiredResource> { ... }
}Expand description
A type-erased, executable system.
Required Methods§
Provided Methods§
Sourcefn requires(&self) -> Vec<RequiredResource>
fn requires(&self) -> Vec<RequiredResource>
Resource types this system needs present, derived automatically from
its bare Res/ResMut parameters. App
checks these before running a non-convergent stage’s systems and
panics with a clear message naming the missing resource(s) rather
than letting a param fetch panic deep inside whichever system happens
to run first.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".