InsertMany

Trait InsertMany 

Source
pub trait InsertMany<T> {
    type Output;

    // Required method
    fn insert_many(&mut self, entity: Entity, value: T) -> Self::Output;
}
Expand description

A trait for adding multiple components to an entity.

§Note

This trait is not meant to be used or implemented directly. Instead it is implemented by the custom derive macro Storage, which is why it must be public.

Required Associated Types§

Source

type Output

The type of the (possibly) updated components.

Required Methods§

Source

fn insert_many(&mut self, entity: Entity, value: T) -> Self::Output

Adds components to the entity.

If the entity already had some components their values are updated and the old values are returned.

Implementors§

Source§

impl<S> InsertMany<()> for World<S>

Source§

impl<S, A, B, C, D, E, F, G> InsertMany<(A, B, C, D, E, F, G)> for World<S>

Source§

type Output = (Option<A>, Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>)

Source§

impl<S, B, C, D, E, F, G> InsertMany<(B, C, D, E, F, G)> for World<S>

Source§

type Output = (Option<B>, Option<C>, Option<D>, Option<E>, Option<F>, Option<G>)

Source§

impl<S, C, D, E, F, G> InsertMany<(C, D, E, F, G)> for World<S>

Source§

type Output = (Option<C>, Option<D>, Option<E>, Option<F>, Option<G>)

Source§

impl<S, D, E, F, G> InsertMany<(D, E, F, G)> for World<S>

Source§

type Output = (Option<D>, Option<E>, Option<F>, Option<G>)

Source§

impl<S, E, F, G> InsertMany<(E, F, G)> for World<S>

Source§

type Output = (Option<E>, Option<F>, Option<G>)

Source§

impl<S, F, G> InsertMany<(F, G)> for World<S>
where S: AsMut<ComponentVec<F>> + AsMut<ComponentVec<G>>,

Source§

type Output = (Option<F>, Option<G>)

Source§

impl<S, G> InsertMany<(G,)> for World<S>
where S: AsMut<ComponentVec<G>>,

Source§

type Output = (Option<G>,)