Trait ComponentSource

Source
pub trait ComponentSource: ComponentLayout {
    // Required methods
    fn is_empty(&mut self) -> bool;
    fn len(&self) -> usize;
    fn write<T: Iterator<Item = Entity>>(
        &mut self,
        entities: T,
        chunk: &mut ComponentStorage,
    ) -> usize;
}
Expand description

A set of components to be attached to one or more entities.

Required Methods§

Source

fn is_empty(&mut self) -> bool

Determines if this component source has any more entity data to write.

Source

fn len(&self) -> usize

Retrieves the nubmer of entities in this component source.

Source

fn write<T: Iterator<Item = Entity>>( &mut self, entities: T, chunk: &mut ComponentStorage, ) -> usize

Writes as many components as possible into a chunk.

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.

Implementors§

Source§

impl<I: Iterator<Item = Entity> + FusedIterator, C: ComponentSource> ComponentSource for PreallocComponentSource<I, C>

Source§

impl<UWU> ComponentSource for ComponentTupleSet<(), UWU>
where UWU: ExactSizeIterator + Iterator<Item = ()>,

Source§

impl<UWU, A> ComponentSource for ComponentTupleSet<(A,), UWU>
where UWU: ExactSizeIterator + Iterator<Item = (A,)>, A: Component,

Source§

impl<UWU, A, B> ComponentSource for ComponentTupleSet<(A, B), UWU>
where UWU: ExactSizeIterator + Iterator<Item = (A, B)>, A: Component, B: Component,

Source§

impl<UWU, A, B, C> ComponentSource for ComponentTupleSet<(A, B, C), UWU>

Source§

impl<UWU, A, B, C, D> ComponentSource for ComponentTupleSet<(A, B, C, D), UWU>

Source§

impl<UWU, A, B, C, D, E> ComponentSource for ComponentTupleSet<(A, B, C, D, E), UWU>

Source§

impl<UWU, A, B, C, D, E, F> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y), UWU>

Source§

impl<UWU, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z), UWU>