[][src]Trait legion_core::world::ComponentSource

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

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

Required methods

fn is_empty(&mut self) -> bool

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

fn len(&self) -> usize

Retrieves the nubmer of entities in this component source.

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

Writes as many components as possible into a chunk.

Loading content...

Implementors

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

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

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

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

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

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

impl<UWU, A, B, C, D, E> ComponentSource for ComponentTupleSet<(A, B, C, D, E), UWU> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component
[src]

impl<UWU, A, B, C, D, E, F> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F), UWU> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component
[src]

impl<UWU, A, B, C, D, E, F, G> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G), UWU> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component
[src]

impl<UWU, A, B, C, D, E, F, G, H> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H), UWU> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component
[src]

impl<UWU, A, B, C, D, E, F, G, H, I> ComponentSource for ComponentTupleSet<(A, B, C, D, E, F, G, H, I), UWU> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component,
    S: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component,
    S: Component,
    T: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component,
    S: Component,
    T: Component,
    U: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component,
    S: Component,
    T: Component,
    U: Component,
    V: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component,
    S: Component,
    T: Component,
    U: Component,
    V: Component,
    W: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component,
    S: Component,
    T: Component,
    U: Component,
    V: Component,
    W: Component,
    X: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (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)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component,
    S: Component,
    T: Component,
    U: Component,
    V: Component,
    W: Component,
    X: Component,
    Y: Component
[src]

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> where
    UWU: ExactSizeIterator + Iterator<Item = (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)>,
    A: Component,
    B: Component,
    C: Component,
    D: Component,
    E: Component,
    F: Component,
    G: Component,
    H: Component,
    I: Component,
    J: Component,
    K: Component,
    L: Component,
    M: Component,
    N: Component,
    O: Component,
    P: Component,
    Q: Component,
    R: Component,
    S: Component,
    T: Component,
    U: Component,
    V: Component,
    W: Component,
    X: Component,
    Y: Component,
    Z: Component
[src]

Loading content...