Trait specs::Join
[−]
[src]
pub trait Join { type Type; type Value; type Mask: BitSetLike; fn open(self) -> (Self::Mask, Self::Value); unsafe fn get(value: &mut Self::Value, id: Index) -> Self::Type; fn join(self) -> JoinIter<Self>
where
Self: Sized, { ... } }
The purpose of the Join
trait is to provide a way
to access multiple storages at the same time with
the merged bit set.
Associated Types
type Type
Type of joined components.
type Value
Type of joined storages.
type Mask: BitSetLike
Type of joined bit mask.
Required Methods
fn open(self) -> (Self::Mask, Self::Value)
Open this join by returning the mask and the storages.
unsafe fn get(value: &mut Self::Value, id: Index) -> Self::Type
Get a joined component value by a given index.
Provided Methods
Implementors
impl<'a, A> Join for (A,) where
A: Join,
(<A as Join>::Mask,): BitAnd,impl<'a, A, B> Join for (A, B) where
A: Join,
B: Join,
(<A as Join>::Mask, <B as Join>::Mask): BitAnd,impl<'a, A, B, C> Join for (A, B, C) where
A: Join,
B: Join,
C: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask): BitAnd,impl<'a, A, B, C, D> Join for (A, B, C, D) where
A: Join,
B: Join,
C: Join,
D: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E> Join for (A, B, C, D, E) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F> Join for (A, B, C, D, E, F) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G> Join for (A, B, C, D, E, F, G) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H> Join for (A, B, C, D, E, F, G, H) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I> Join for (A, B, C, D, E, F, G, H, I) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J> Join for (A, B, C, D, E, F, G, H, I, J) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J, K> Join for (A, B, C, D, E, F, G, H, I, J, K) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
K: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask, <K as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J, K, L> Join for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
K: Join,
L: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask, <K as Join>::Mask, <L as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M> Join for (A, B, C, D, E, F, G, H, I, J, K, L, M) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
K: Join,
L: Join,
M: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask, <K as Join>::Mask, <L as Join>::Mask, <M as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N> Join for (A, B, C, D, E, F, G, H, I, J, K, L, M, N) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
K: Join,
L: Join,
M: Join,
N: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask, <K as Join>::Mask, <L as Join>::Mask, <M as Join>::Mask, <N as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> Join for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
K: Join,
L: Join,
M: Join,
N: Join,
O: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask, <K as Join>::Mask, <L as Join>::Mask, <M as Join>::Mask, <N as Join>::Mask, <O as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Join for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
K: Join,
L: Join,
M: Join,
N: Join,
O: Join,
P: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask, <K as Join>::Mask, <L as Join>::Mask, <M as Join>::Mask, <N as Join>::Mask, <O as Join>::Mask, <P as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> Join for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
K: Join,
L: Join,
M: Join,
N: Join,
O: Join,
P: Join,
Q: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask, <K as Join>::Mask, <L as Join>::Mask, <M as Join>::Mask, <N as Join>::Mask, <O as Join>::Mask, <P as Join>::Mask, <Q as Join>::Mask): BitAnd,impl<'a, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> Join for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) where
A: Join,
B: Join,
C: Join,
D: Join,
E: Join,
F: Join,
G: Join,
H: Join,
I: Join,
J: Join,
K: Join,
L: Join,
M: Join,
N: Join,
O: Join,
P: Join,
Q: Join,
R: Join,
(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask, <G as Join>::Mask, <H as Join>::Mask, <I as Join>::Mask, <J as Join>::Mask, <K as Join>::Mask, <L as Join>::Mask, <M as Join>::Mask, <N as Join>::Mask, <O as Join>::Mask, <P as Join>::Mask, <Q as Join>::Mask, <R as Join>::Mask): BitAnd,impl<'a, 'e, T, D> Join for &'a CheckStorage<'e, T, D>
impl<'a, C, T: UnprotectedStorage<C>> Join for &'a FlaggedStorage<C, T>
impl<'a, C, T: UnprotectedStorage<C>> Join for &'a mut FlaggedStorage<C, T>
impl<'a, 'e, T, D> Join for &'a Storage<'e, T, D> where
T: Component,
D: Deref<Target = MaskedStorage<T>>,impl<'a, 'e, T, D> Join for &'a mut Storage<'e, T, D> where
T: Component,
D: DerefMut<Target = MaskedStorage<T>>,impl<'a> Join for &'a EntitiesRes