pub trait ChannelTriggerApp {
// Required method
fn add_channel_trigger<T: Event>(&mut self) -> ChannelSender<T>;
}Expand description
Extension to Bevy App that allows ergonomic creation of the channel
Required Methods§
Sourcefn add_channel_trigger<T: Event>(&mut self) -> ChannelSender<T>
fn add_channel_trigger<T: Event>(&mut self) -> ChannelSender<T>
Spawns a channel registers the receiver as a resource and returns the ChannelSender<T>
This sender can be used from anywhere to send events into the Bevy world.
These triggers can be subscribed to via app.observe.
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.