pub trait AddScriptHost {
// Required methods
fn add_script_host<T: ScriptHost>(
&mut self,
schedule: impl ScheduleLabel,
) -> &mut Self;
fn add_script_host_to_set<T: ScriptHost>(
&mut self,
schedule: impl ScheduleLabel,
set: impl SystemSet,
) -> &mut Self;
}
Expand description
Trait for app builder notation
Required Methods§
Sourcefn add_script_host<T: ScriptHost>(
&mut self,
schedule: impl ScheduleLabel,
) -> &mut Self
fn add_script_host<T: ScriptHost>( &mut self, schedule: impl ScheduleLabel, ) -> &mut Self
registers the given script host with your app, the given system set will contain systems handling script loading, re-loading, removal etc. This system set will also send events related to the script lifecycle.
Note: any systems which need to run the same frame a script is loaded must run after this set.
Sourcefn add_script_host_to_set<T: ScriptHost>(
&mut self,
schedule: impl ScheduleLabel,
set: impl SystemSet,
) -> &mut Self
fn add_script_host_to_set<T: ScriptHost>( &mut self, schedule: impl ScheduleLabel, set: impl SystemSet, ) -> &mut Self
Similar to add_script_host
but allows you to specify a system set to add the script host to.
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.