pub trait SystemBuffer:
FromWorld
+ Send
+ 'static {
// Required method
fn apply(&mut self, system_meta: &SystemMeta, world: &mut World);
// Provided method
fn queue(&mut self, _system_meta: &SystemMeta, _world: DeferredWorld<'_>) { ... }
}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.
Provided Methods§
Sourcefn queue(&mut self, _system_meta: &SystemMeta, _world: DeferredWorld<'_>)
fn queue(&mut self, _system_meta: &SystemMeta, _world: DeferredWorld<'_>)
Queues any deferred mutations to be applied at the next ApplyDeferred.
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.