Trait specs::join::Join

source ·
pub unsafe trait Join {
    type Type;
    type Value;
    type Mask: BitSetLike;

    // Required methods
    unsafe fn open(self) -> (Self::Mask, Self::Value);
    unsafe fn get(value: &mut Self::Value, id: Index) -> Self::Type;

    // Provided methods
    fn join(self) -> JoinIter<Self> 
       where Self: Sized { ... }
    fn is_unconstrained() -> bool { ... }
}
Expand description

The purpose of the Join trait is to provide a way to access multiple storages at the same time with the merged bit set.

Joining component storages means that you’ll only get values where for a given entity every storage has an associated component.

Example

let mut world = World::new();

world.register::<Pos>();
world.register::<Vel>();

{
    let pos = world.read_storage::<Pos>();
    let vel = world.read_storage::<Vel>();

    // There are no entities yet, so no pair will be returned.
    let joined: Vec<_> = (&pos, &vel).join().collect();
    assert_eq!(joined, vec![]);
}

world.create_entity().with(Pos).build();

{
    let pos = world.read_storage::<Pos>();
    let vel = world.read_storage::<Vel>();

    // Although there is an entity, it only has `Pos`.
    let joined: Vec<_> = (&pos, &vel).join().collect();
    assert_eq!(joined, vec![]);
}

let ent = world.create_entity().with(Pos).with(Vel).build();

{
    let pos = world.read_storage::<Pos>();
    let vel = world.read_storage::<Vel>();

    // Now there is one entity that has both a `Vel` and a `Pos`.
    let joined: Vec<_> = (&pos, &vel).join().collect();
    assert_eq!(joined, vec![(&Pos, &Vel)]);

    // If we want to get the entity the components are associated to,
    // we need to join over `Entities`:

    let entities = world.read_resource::<EntitiesRes>();
    // note: `EntitiesRes` is the fetched resource; we get back
    // `Read<EntitiesRes>`.
    // `Read<EntitiesRes>` can also be referred to by `Entities` which
    // is a shorthand type definition to the former type.

    let joined: Vec<_> = (&entities, &pos, &vel).join().collect();
    assert_eq!(joined, vec![(ent, &Pos, &Vel)]);
}

Iterating over a single storage

Join can also be used to iterate over a single storage, just by writing (&storage).join().

Safety

The Self::Mask value returned with the Self::Value must correspond such that it is safe to retrieve items from Self::Value whose presence is indicated in the mask. As part of this, BitSetLike::iter must not produce an iterator that repeats an Index value.

Required Associated Types§

source

type Type

Type of joined components.

source

type Value

Type of joined storages.

source

type Mask: BitSetLike

Type of joined bit mask.

Required Methods§

source

unsafe fn open(self) -> (Self::Mask, Self::Value)

Open this join by returning the mask and the storages.

Safety

This is unsafe because implementations of this trait can permit the Value to be mutated independently of the Mask. If the Mask does not correctly report the status of the Value then illegal memory access can occur.

source

unsafe fn get(value: &mut Self::Value, id: Index) -> Self::Type

Get a joined component value by a given index.

Safety
  • A call to get must be preceded by a check if id is part of Self::Mask.
  • Multiple calls with the same id are not allowed, for a particular instance of the values from open.

Provided Methods§

source

fn join(self) -> JoinIter<Self> where Self: Sized,

Create a joined iterator over the contents.

source

fn is_unconstrained() -> bool

If this Join typically returns all indices in the mask, then iterating over only it or combined with other joins that are also dangerous will cause the JoinIter to go through all indices which is usually not what is wanted and will kill performance.

Implementations on Foreign Types§

source§

impl<'a, A, B> Join for &'a BitSetAnd<A, B>where A: BitSetLike, B: BitSetLike,

§

type Type = u32

§

type Value = ()

§

type Mask = &'a BitSetAnd<A, B>

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<A, B> Join for BitSetAnd<A, B>where A: BitSetLike, B: BitSetLike,

§

type Type = u32

§

type Value = ()

§

type Mask = BitSetAnd<A, B>

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl Join for AtomicBitSet

§

type Type = u32

§

type Value = ()

§

type Mask = AtomicBitSet

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<'a> Join for &'a dyn BitSetLike

§

type Type = u32

§

type Value = ()

§

type Mask = &'a dyn BitSetLike

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type, <K as Join>::Type, <L as Join>::Type, <M as Join>::Type, <N as Join>::Type, <O as Join>::Type, <P as Join>::Type, <Q as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value, <K as Join>::Value, <L as Join>::Value, <M as Join>::Value, <N as Join>::Value, <O as Join>::Value, <P as Join>::Value, <Q as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<'a, 'b, T> Join for &'a mut FetchMut<'b, T>where &'a mut T: Join, T: Resource,

§

type Type = <&'a mut T as Join>::Type

§

type Value = <&'a mut T as Join>::Value

§

type Mask = <&'a mut T as Join>::Mask

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<A, B> Join for (A, B)where A: Join, B: Join, (<A as Join>::Mask, <B as Join>::Mask): BitAnd,

§

type Type = (<A as Join>::Type, <B as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value)

§

type Mask = <(<A as Join>::Mask, <B as Join>::Mask) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<'a> Join for &'a AtomicBitSet

§

type Type = u32

§

type Value = ()

§

type Mask = &'a AtomicBitSet

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<'a, A> Join for &'a BitSetNot<A>where A: BitSetLike,

§

type Type = u32

§

type Value = ()

§

type Mask = &'a BitSetNot<A>

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type, <K as Join>::Type, <L as Join>::Type, <M as Join>::Type, <N as Join>::Type, <O as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value, <K as Join>::Value, <L as Join>::Value, <M as Join>::Value, <N as Join>::Value, <O as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type, <K as Join>::Type, <L as Join>::Type, <M as Join>::Type, <N as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value, <K as Join>::Value, <L as Join>::Value, <M as Join>::Value, <N as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value)

§

type Mask = <(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<'a, 'b, T> Join for &'a Fetch<'b, T>where &'a T: Join, T: Resource,

§

type Type = <&'a T as Join>::Type

§

type Value = <&'a T as Join>::Value

§

type Mask = <&'a T as Join>::Mask

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value)

§

type Mask = <(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<'a, A, B> Join for &'a BitSetOr<A, B>where A: BitSetLike, B: BitSetLike,

§

type Type = u32

§

type Value = ()

§

type Mask = &'a BitSetOr<A, B>

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<A> Join for (A,)where A: Join, (<A as Join>::Mask,): BitAnd,

§

type Type = (<A as Join>::Type,)

§

type Value = (<A as Join>::Value,)

§

type Mask = <(<A as Join>::Mask,) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value)

§

type Mask = <(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type, <K as Join>::Type, <L as Join>::Type, <M as Join>::Type, <N as Join>::Type, <O as Join>::Type, <P as Join>::Type, <Q as Join>::Type, <R as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value, <K as Join>::Value, <L as Join>::Value, <M as Join>::Value, <N as Join>::Value, <O as Join>::Value, <P as Join>::Value, <Q as Join>::Value, <R as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type, <K as Join>::Type, <L as Join>::Type, <M as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value, <K as Join>::Value, <L as Join>::Value, <M as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<A, B> Join for BitSetXor<A, B>where A: BitSetLike, B: BitSetLike,

§

type Type = u32

§

type Value = ()

§

type Mask = BitSetXor<A, B>

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<A> Join for BitSetNot<A>where A: BitSetLike,

§

type Type = u32

§

type Value = ()

§

type Mask = BitSetNot<A>

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type, <K as Join>::Type, <L as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value, <K as Join>::Value, <L as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<A, B> Join for BitSetOr<A, B>where A: BitSetLike, B: BitSetLike,

§

type Type = u32

§

type Value = ()

§

type Mask = BitSetOr<A, B>

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(_: &mut Self::Value, id: Index) -> Self::Type

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type, <K as Join>::Type, <L as Join>::Type, <M as Join>::Type, <N as Join>::Type, <O as Join>::Type, <P as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value, <K as Join>::Value, <L as Join>::Value, <M as Join>::Value, <N as Join>::Value, <O as Join>::Value, <P as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type, <G as Join>::Type, <H as Join>::Type, <I as Join>::Type, <J as Join>::Type, <K as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value, <G as Join>::Value, <H as Join>::Value, <I as Join>::Value, <J as Join>::Value, <K as Join>::Value)

§

type Mask = <(<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) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

source§

impl<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,

§

type Type = (<A as Join>::Type, <B as Join>::Type, <C as Join>::Type, <D as Join>::Type, <E as Join>::Type, <F as Join>::Type)

§

type Value = (<A as Join>::Value, <B as Join>::Value, <C as Join>::Value, <D as Join>::Value, <E as Join>::Value, <F as Join>::Value)

§

type Mask = <(<A as Join>::Mask, <B as Join>::Mask, <C as Join>::Mask, <D as Join>::Mask, <E as Join>::Mask, <F as Join>::Mask) as BitAnd>::Value

source§

unsafe fn open(self) -> (Self::Mask, Self::Value)

source§

unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type

source§

fn is_unconstrained() -> bool

Implementors§

source§

impl Join for BitSet

§

type Type = u32

§

type Value = ()

§

type Mask = BitSet

source§

impl<'a> Join for &'a BitSet

§

type Type = u32

§

type Value = ()

§

type Mask = &'a BitSet

source§

impl<'a> Join for &'a EntitiesRes

source§

impl<'a> Join for AntiStorage<'a>

§

type Mask = BitSetNot<&'a BitSet>

§

type Type = ()

§

type Value = ()

source§

impl<'a, 'b, T> Join for &'a Read<'b, T>where &'a T: Join, T: Resource,

§

type Type = <&'a T as Join>::Type

§

type Value = <&'a T as Join>::Value

§

type Mask = <&'a T as Join>::Mask

source§

impl<'a, 'b, T> Join for &'a ReadExpect<'b, T>where &'a T: Join, T: Resource,

§

type Type = <&'a T as Join>::Type

§

type Value = <&'a T as Join>::Value

§

type Mask = <&'a T as Join>::Mask

source§

impl<'a, 'b, T> Join for &'a mut Write<'b, T>where &'a mut T: Join, T: Resource,

§

type Type = <&'a mut T as Join>::Type

§

type Value = <&'a mut T as Join>::Value

§

type Mask = <&'a mut T as Join>::Mask

source§

impl<'a, 'b, T> Join for &'a mut WriteExpect<'b, T>where &'a mut T: Join, T: Resource,

§

type Type = <&'a mut T as Join>::Type

§

type Value = <&'a mut T as Join>::Value

§

type Mask = <&'a mut T as Join>::Mask

source§

impl<'a, 'e, T, D> Join for &'a Storage<'e, T, D>where T: Component, D: Deref<Target = MaskedStorage<T>>,

§

type Mask = &'a BitSet

§

type Type = &'a T

§

type Value = &'a <T as Component>::Storage

source§

impl<'a, 'e, T, D> Join for &'a mut Storage<'e, T, D>where T: Component, D: DerefMut<Target = MaskedStorage<T>>, T::Storage: SharedGetMutStorage<T>,

§

type Mask = &'a BitSet

§

type Type = <<T as Component>::Storage as UnprotectedStorage<T>>::AccessMut<'a>

§

type Value = SharedGetMutOnly<'a, T, <T as Component>::Storage>

source§

impl<'a, T> Join for &'a ChangeSet<T>

§

type Mask = &'a BitSet

§

type Type = &'a T

§

type Value = &'a DenseVecStorage<T>

source§

impl<'a, T> Join for &'a mut ChangeSet<T>

source§

impl<'rf, C, S> Join for &'rf RestrictedStorage<'rf, C, S>where C: Component, S: Borrow<C::Storage>,

§

type Mask = &'rf BitSet

§

type Type = PairedStorageRead<'rf, C>

§

type Value = (&'rf <C as Component>::Storage, &'rf Fetch<'rf, EntitiesRes>, &'rf BitSet)

source§

impl<'rf, C, S> Join for &'rf mut RestrictedStorage<'rf, C, S>where C: Component, S: BorrowMut<C::Storage>, C::Storage: SharedGetMutStorage<C>,

§

type Mask = &'rf BitSet

§

type Type = PairedStorageWriteShared<'rf, C>

§

type Value = SharedGetOnly<'rf, C, <C as Component>::Storage>

source§

impl<T> Join for ChangeSet<T>

A Join implementation for ChangeSet that simply removes all the entries on a call to get.

§

type Mask = BitSet

§

type Type = T

§

type Value = DenseVecStorage<T>

source§

impl<T> Join for MaybeJoin<T>where T: Join,

§

type Mask = BitSetAll

§

type Type = Option<<T as Join>::Type>

§

type Value = (<T as Join>::Mask, <T as Join>::Value)