pub trait ProvideOnce {
type Request;
type Response;
type Streams;
// Required method
fn connect(
self,
scope: Option<Entity>,
source: Entity,
target: Entity,
commands: &mut Commands<'_, '_>,
);
}Expand description
Similar to Provider but can be used for functions that are only able to
run once, e.g. that use FnOnce. Because of this, ProvideOnce is
suitable for a series, but not for workflows.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".