Trait bevy::ecs::system::SystemBuffer
source · pub trait SystemBuffer: FromWorld + Send + 'static {
// Required method
fn apply(&mut self, system_meta: &SystemMeta, world: &mut World);
}
Expand description
Types that can be used with Deferred<T>
in systems.
This allows storing system-local data which is used to defer World
mutations.
Types that implement SystemBuffer
should take care to perform as many
computations up-front as possible. Buffers cannot be applied in parallel,
so you should try to minimize the time spent in SystemBuffer::apply
.
Required Methods§
sourcefn apply(&mut self, system_meta: &SystemMeta, world: &mut World)
fn apply(&mut self, system_meta: &SystemMeta, world: &mut World)
Applies any deferred mutations to the World
.
Object Safety§
This trait is not object safe.