Trait specs::join::LendJoin

source ·
pub unsafe trait LendJoin: for<'next> LendJoinඞType<'next> {
    type Value;
    type Mask: BitSetLike;

    // Required methods
    unsafe fn open(self) -> (Self::Mask, Self::Value);
    unsafe fn get<'next>(
        value: &'next mut Self::Value,
        id: Index
    ) -> <Self as LendJoinඞType<'next>>::T;

    // Provided methods
    fn lend_join(self) -> JoinLendIter<Self>
       where Self: Sized { ... }
    fn maybe(self) -> MaybeJoin<Self>
       where Self: Sized { ... }
    fn is_unconstrained() -> bool { ... }
}
Expand description

Like the Join trait except this is similar to a lending iterator in that only one item can be accessed at once.

The type returned from .lend_join(), JoinLendIter does not implement Iterator like JoinIter does. Instead, it provides a next method that exclusively borrows the JoinLendIter for the lifetime of the returned value.

This limitation allows freedom for more patterns to be soundly implemented. Thus, LendJoin acts as the “lowest common denominator” of the Join-like traits (i.e. if something can implement Join it can also implement LendJoin).

In particular, Entries only implements LendJoin. As another example, RestrictedStorage implements both Join and LendJoin. However, for joining mutably, lend join variant produces PairedStorageWriteExclusive values which have get_other/get_other_mut methods that aren’t provided by PairedStorageWriteShared.

Finally, these limitations allow providing the JoinLendIter::get method which can be useful to get a set of components from an entity without calling get individually on each storage (see the example in that method’s docs).

Also see the lend_join example.

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 if the LendJoin::get impl relies on not being called twice with the same Index.

Required Associated Types§

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<'next>( value: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

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. Unless this type implements the unsafe trait RepeatableLendGet.

Provided Methods§

source

fn lend_join(self) -> JoinLendIter<Self>where Self: Sized,

Create a joined lending iterator over the contents.

source

fn maybe(self) -> MaybeJoin<Self>where Self: Sized,

Returns a structure that implements Join/LendJoin/MaybeJoin if the contained T does and that yields all indices, returning None for all missing elements and Some(T) for found elements.

To join over and optional component mutably this pattern can be used: (&mut storage).maybe().

WARNING: Do not have a join of only MaybeJoins. Otherwise the join will iterate over every single index of the bitset. If you want a join with all MaybeJoins, add an EntitiesRes to the join as well to bound the join to all entities that are alive.

struct ExampleSystem;
impl<'a> System<'a> for ExampleSystem {
    type SystemData = (
        WriteStorage<'a, Pos>,
        ReadStorage<'a, Vel>,
    );
    fn run(&mut self, (mut positions, velocities): Self::SystemData) {
        let mut join = (&mut positions, velocities.maybe()).lend_join();
        while let Some ((mut position, maybe_velocity)) = join.next() {
            if let Some(velocity) = maybe_velocity {
                position.x += velocity.x;
                position.y += velocity.y;
            }
        }
    }
}

fn main() {
    let mut world = World::new();
    let mut dispatcher = DispatcherBuilder::new()
        .with(ExampleSystem, "example_system", &[])
        .build();

    dispatcher.setup(&mut world);

    let e1 = world.create_entity()
        .with(Pos { x: 0, y: 0 })
        .with(Vel { x: 5, y: 2 })
        .build();

    let e2 = world.create_entity()
        .with(Pos { x: 0, y: 0 })
        .build();

    dispatcher.dispatch(&mut world);

    let positions = world.read_storage::<Pos>();
    assert_eq!(positions.get(e1), Some(&Pos { x: 5, y: 2 }));
    assert_eq!(positions.get(e2), Some(&Pos { x: 0, y: 0 }));
}
source

fn is_unconstrained() -> bool

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

Implementations on Foreign Types§

source§

impl LendJoin for AtomicBitSet

§

type Value = ()

§

type Mask = AtomicBitSet

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

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

§

type Value = ()

§

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

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

impl<A, B, C, D, E, F> LendJoin for (A, B, C, D, E, F)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

type Value = ()

§

type Mask = BitSetOr<A, B>

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

impl<A, B, C, D, E> LendJoin for (A, B, C, D, E)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> LendJoin for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, K: LendJoin, L: LendJoin, M: LendJoin, N: LendJoin, O: LendJoin, P: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask, <K as LendJoin>::Mask, <L as LendJoin>::Mask, <M as LendJoin>::Mask, <N as LendJoin>::Mask, <O as LendJoin>::Mask, <P as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<'a> LendJoin for &'a AtomicBitSet

§

type Value = ()

§

type Mask = &'a AtomicBitSet

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

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

§

type Value = ()

§

type Mask = BitSetXor<A, B>

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> LendJoin for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, K: LendJoin, L: LendJoin, M: LendJoin, N: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask, <K as LendJoin>::Mask, <L as LendJoin>::Mask, <M as LendJoin>::Mask, <N as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

type Value = ()

§

type Mask = BitSetAnd<A, B>

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

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

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

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> LendJoin for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, K: LendJoin, L: LendJoin, M: LendJoin, N: LendJoin, O: LendJoin, P: LendJoin, Q: LendJoin, R: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask, <K as LendJoin>::Mask, <L as LendJoin>::Mask, <M as LendJoin>::Mask, <N as LendJoin>::Mask, <O as LendJoin>::Mask, <P as LendJoin>::Mask, <Q as LendJoin>::Mask, <R as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<A, B, C, D, E, F, G> LendJoin for (A, B, C, D, E, F, G)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<A, B, C, D, E, F, G, H, I> LendJoin for (A, B, C, D, E, F, G, H, I)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> LendJoin for (A, B, C, D, E, F, G, H, I, J, K, L, M)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, K: LendJoin, L: LendJoin, M: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask, <K as LendJoin>::Mask, <L as LendJoin>::Mask, <M as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<A, B, C, D, E, F, G, H> LendJoin for (A, B, C, D, E, F, G, H)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<A, B, C, D, E, F, G, H, I, J> LendJoin for (A, B, C, D, E, F, G, H, I, J)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

type Value = ()

§

type Mask = &'a dyn BitSetLike

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> LendJoin for (A, B, C, D, E, F, G, H, I, J, K, L)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, K: LendJoin, L: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask, <K as LendJoin>::Mask, <L as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

type Value = ()

§

type Mask = BitSetNot<A>

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

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

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

type Value = ()

§

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

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> LendJoin for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, K: LendJoin, L: LendJoin, M: LendJoin, N: LendJoin, O: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask, <K as LendJoin>::Mask, <L as LendJoin>::Mask, <M as LendJoin>::Mask, <N as LendJoin>::Mask, <O as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

type Value = ()

§

type Mask = &'a BitSetNot<A>

source§

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

source§

unsafe fn get<'next>( _: &'next mut Self::Value, id: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

impl<A, B, C, D> LendJoin for (A, B, C, D)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<A, B, C, D, E, F, G, H, I, J, K> LendJoin for (A, B, C, D, E, F, G, H, I, J, K)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, K: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask, <K as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> LendJoin for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q)where A: LendJoin, B: LendJoin, C: LendJoin, D: LendJoin, E: LendJoin, F: LendJoin, G: LendJoin, H: LendJoin, I: LendJoin, J: LendJoin, K: LendJoin, L: LendJoin, M: LendJoin, N: LendJoin, O: LendJoin, P: LendJoin, Q: LendJoin, (<A as LendJoin>::Mask, <B as LendJoin>::Mask, <C as LendJoin>::Mask, <D as LendJoin>::Mask, <E as LendJoin>::Mask, <F as LendJoin>::Mask, <G as LendJoin>::Mask, <H as LendJoin>::Mask, <I as LendJoin>::Mask, <J as LendJoin>::Mask, <K as LendJoin>::Mask, <L as LendJoin>::Mask, <M as LendJoin>::Mask, <N as LendJoin>::Mask, <O as LendJoin>::Mask, <P as LendJoin>::Mask, <Q as LendJoin>::Mask): BitAnd,

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

source§

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

§

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

§

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

source§

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

source§

unsafe fn get<'next>( v: &'next mut Self::Value, i: Index ) -> <Self as LendJoinඞType<'next>>::T

source§

fn is_unconstrained() -> bool

Implementors§

source§

impl LendJoin for BitSet

§

type Value = ()

§

type Mask = BitSet

source§

impl<'a> LendJoin for &'a BitSet

§

type Value = ()

§

type Mask = &'a BitSet

source§

impl<'a> LendJoin for &'a EntitiesRes

source§

impl<'a> LendJoin for AntiStorage<'a>

§

type Mask = BitSetNot<&'a BitSet>

§

type Value = ()

source§

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

§

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

§

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

source§

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

§

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

§

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

source§

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

source§

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

source§

impl<'a, 'b: 'a, T, D> LendJoin for Entries<'a, 'b, T, D>where T: Component + 'a, D: DerefMut<Target = MaskedStorage<T>> + 'a,

§

type Mask = BitSetAll

§

type Value = &'a mut Storage<'b, T, D>

source§

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

§

type Mask = &'a BitSet

§

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

source§

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

§

type Mask = &'a BitSet

§

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

source§

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

§

type Mask = &'a BitSet

§

type Value = &'a DenseVecStorage<T>

source§

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

§

type Mask = &'a BitSet

§

type Value = &'a mut DenseVecStorage<T>

source§

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

§

type Mask = &'rf BitSet

§

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

source§

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

§

type Mask = &'rf BitSet

§

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

source§

impl<T> LendJoin for ChangeSet<T>

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

source§

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

§

type Mask = BitSetAll

§

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