Struct bevy_defer::AsyncPlugin
source · pub struct AsyncPlugin { /* private fields */ }
Expand description
An bevy_defer
plugin that can run the executor through user configuration.
This plugin is not unique and can be used repeatedly to add runs.
Implementations§
source§impl AsyncPlugin
impl AsyncPlugin
sourcepub fn empty() -> Self
pub fn empty() -> Self
Equivalent to CoreAsyncPlugin
.
Use AsyncPlugin::run_in
and AsyncPlugin::run_in_set
to add runs.
sourcepub fn default_settings() -> Self
pub fn default_settings() -> Self
Run in Update
once.
This is usually enough, be sure to order your
systems against run_async_executor
correctly if needed.
sourcepub fn busy_schedule() -> Self
pub fn busy_schedule() -> Self
Run in PreUpdate
, Update
and PostUpdate
.
source§impl AsyncPlugin
impl AsyncPlugin
sourcepub fn run_in(self, schedule: impl ScheduleLabel) -> Self
pub fn run_in(self, schedule: impl ScheduleLabel) -> Self
Run the executor in a specific Schedule
.
sourcepub fn run_in_set(
self,
schedule: impl ScheduleLabel,
set: impl SystemSet
) -> Self
pub fn run_in_set( self, schedule: impl ScheduleLabel, set: impl SystemSet ) -> Self
Run the executor in a specific Schedule
and SystemSet
.
Trait Implementations§
source§impl Debug for AsyncPlugin
impl Debug for AsyncPlugin
source§impl Plugin for AsyncPlugin
impl Plugin for AsyncPlugin
source§fn is_unique(&self) -> bool
fn is_unique(&self) -> bool
If the plugin can be meaningfully instantiated several times in an
App
,
override this method to return false
.source§fn ready(&self, _app: &App) -> bool
fn ready(&self, _app: &App) -> bool
Has the plugin finished its setup? This can be useful for plugins that need something
asynchronous to happen before they can finish their setup, like the initialization of a renderer.
Once the plugin is ready,
finish
should be called.source§fn finish(&self, _app: &mut App)
fn finish(&self, _app: &mut App)
Finish adding this plugin to the
App
, once all plugins registered are ready. This can
be useful for plugins that depends on another plugin asynchronous setup, like the renderer.Auto Trait Implementations§
impl Freeze for AsyncPlugin
impl !RefUnwindSafe for AsyncPlugin
impl Send for AsyncPlugin
impl Sync for AsyncPlugin
impl Unpin for AsyncPlugin
impl !UnwindSafe for AsyncPlugin
Blanket Implementations§
source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.