[][src]Trait shred::SystemData

pub trait SystemData<'a> {
    fn setup(res: &mut Resources);
fn fetch(res: &'a Resources) -> Self;
fn reads() -> Vec<ResourceId>;
fn writes() -> Vec<ResourceId>; }

A static system data that can specify its dependencies at statically (at compile-time). Most system data is a SystemData, the DynamicSystemData type is only needed for very special setups.

Required methods

fn setup(res: &mut Resources)

Sets up the system data for fetching it from the Resources.

fn fetch(res: &'a Resources) -> Self

Fetches the system data from Resources. Note that this is only specified for one concrete lifetime 'a, you need to implement the SystemData trait for every possible lifetime.

fn reads() -> Vec<ResourceId>

Returns all read dependencies as fetched from Self::fetch.

Please note that returning wrong dependencies can lead to a panic.

fn writes() -> Vec<ResourceId>

Returns all write dependencies as fetched from Self::fetch.

Please note that returning wrong dependencies can lead to a panic.

Loading content...

Implementations on Foreign Types

impl<'a, T, F> SystemData<'a> for Option<Read<'a, T, F>> where
    T: Resource
[src]

impl<'a, T, F> SystemData<'a> for Option<Write<'a, T, F>> where
    T: Resource
[src]

impl<'a> SystemData<'a> for ()[src]

impl<'a, T: ?Sized> SystemData<'a> for PhantomData<T>[src]

impl<'a, A> SystemData<'a> for (A,) where
    A: SystemData<'a>, 
[src]

impl<'a, A, B> SystemData<'a> for (A, B) where
    A: SystemData<'a>,
    B: SystemData<'a>, 
[src]

impl<'a, A, B, C> SystemData<'a> for (A, B, C) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>, 
[src]

impl<'a, A, B, C, D> SystemData<'a> for (A, B, C, D) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E> SystemData<'a> for (A, B, C, D, E) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F> SystemData<'a> for (A, B, C, D, E, F) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G> SystemData<'a> for (A, B, C, D, E, F, G) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H> SystemData<'a> for (A, B, C, D, E, F, G, H) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I> SystemData<'a> for (A, B, C, D, E, F, G, H, I) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>,
    S: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>,
    S: SystemData<'a>,
    T: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>,
    S: SystemData<'a>,
    T: SystemData<'a>,
    U: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>,
    S: SystemData<'a>,
    T: SystemData<'a>,
    U: SystemData<'a>,
    V: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>,
    S: SystemData<'a>,
    T: SystemData<'a>,
    U: SystemData<'a>,
    V: SystemData<'a>,
    W: SystemData<'a>, 
[src]

impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X> SystemData<'a> for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>,
    S: SystemData<'a>,
    T: SystemData<'a>,
    U: SystemData<'a>,
    V: SystemData<'a>,
    W: SystemData<'a>,
    X: SystemData<'a>, 
[src]

impl<'a, 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> SystemData<'a> for (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) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>,
    S: SystemData<'a>,
    T: SystemData<'a>,
    U: SystemData<'a>,
    V: SystemData<'a>,
    W: SystemData<'a>,
    X: SystemData<'a>,
    Y: SystemData<'a>, 
[src]

impl<'a, 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> SystemData<'a> for (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) where
    A: SystemData<'a>,
    B: SystemData<'a>,
    C: SystemData<'a>,
    D: SystemData<'a>,
    E: SystemData<'a>,
    F: SystemData<'a>,
    G: SystemData<'a>,
    H: SystemData<'a>,
    I: SystemData<'a>,
    J: SystemData<'a>,
    K: SystemData<'a>,
    L: SystemData<'a>,
    M: SystemData<'a>,
    N: SystemData<'a>,
    O: SystemData<'a>,
    P: SystemData<'a>,
    Q: SystemData<'a>,
    R: SystemData<'a>,
    S: SystemData<'a>,
    T: SystemData<'a>,
    U: SystemData<'a>,
    V: SystemData<'a>,
    W: SystemData<'a>,
    X: SystemData<'a>,
    Y: SystemData<'a>,
    Z: SystemData<'a>, 
[src]

Loading content...

Implementors

impl<'a, T, F> SystemData<'a> for Read<'a, T, F> where
    T: Resource,
    F: SetupHandler<T>, 
[src]

impl<'a, T, F> SystemData<'a> for Write<'a, T, F> where
    T: Resource,
    F: SetupHandler<T>, 
[src]

Loading content...