Trait CloneBundle

Source
pub trait CloneBundle: Bundle + CloneBundle { }
Expand description

Explicit tuple of zero to eight owned Clone + 'static component types.

Sealed to keep selected reads and spawned bundles consistent. See World::plan_duplication for a complete actor-template recipe. Choose stored component types rather than query access types, for example (Position, Health). An Entity entry selects an explicitly stored Entity component, not identity.

Non-Clone components remain supported by ordinary bundles, but cannot be selected for duplication:

ⓘ
use ferravex_ecs::World;
struct AudioVoice;
let mut world = World::new();
let entity = world.spawn((AudioVoice,));
world.plan_duplication::<(AudioVoice,), 1>([entity]);

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.

Implementations on Foreign Types§

Source§

impl CloneBundle for ()

Source§

impl<A> CloneBundle for (A,)
where A: Clone + 'static,

Source§

impl<A, B> CloneBundle for (A, B)
where A: Clone + 'static, B: Clone + 'static,

Source§

impl<A, B, C> CloneBundle for (A, B, C)
where A: Clone + 'static, B: Clone + 'static, C: Clone + 'static,

Source§

impl<A, B, C, D> CloneBundle for (A, B, C, D)
where A: Clone + 'static, B: Clone + 'static, C: Clone + 'static, D: Clone + 'static,

Source§

impl<A, B, C, D, E> CloneBundle for (A, B, C, D, E)
where A: Clone + 'static, B: Clone + 'static, C: Clone + 'static, D: Clone + 'static, E: Clone + 'static,

Source§

impl<A, B, C, D, E, F> CloneBundle for (A, B, C, D, E, F)
where A: Clone + 'static, B: Clone + 'static, C: Clone + 'static, D: Clone + 'static, E: Clone + 'static, F: Clone + 'static,

Source§

impl<A, B, C, D, E, F, G> CloneBundle for (A, B, C, D, E, F, G)
where A: Clone + 'static, B: Clone + 'static, C: Clone + 'static, D: Clone + 'static, E: Clone + 'static, F: Clone + 'static, G: Clone + 'static,

Source§

impl<A, B, C, D, E, F, G, H> CloneBundle for (A, B, C, D, E, F, G, H)
where A: Clone + 'static, B: Clone + 'static, C: Clone + 'static, D: Clone + 'static, E: Clone + 'static, F: Clone + 'static, G: Clone + 'static, H: Clone + 'static,

Implementors§