[][src]Struct specs::join::MaybeJoin

pub struct MaybeJoin<J: Join>(pub J);

A Join-able structure that yields all indices, returning None for all missing elements and Some(T) for found elements.

For usage see Join::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.

Trait Implementations

impl<T> Join for MaybeJoin<T> where
    T: Join
[src]

type Mask = BitSetAll

Type of joined bit mask.

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

Type of joined components.

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

Type of joined storages.

Important traits for JoinIter<J>
fn join(self) -> JoinIter<Self> where
    Self: Sized
[src]

Create a joined iterator over the contents.

fn maybe(self) -> MaybeJoin<Self> where
    Self: Sized
[src]

Returns a Join-able structure that yields all indices, returning None for all missing elements and Some(T) for found elements. Read more

Auto Trait Implementations

impl<J> Send for MaybeJoin<J> where
    J: Send

impl<J> Unpin for MaybeJoin<J> where
    J: Unpin

impl<J> Sync for MaybeJoin<J> where
    J: Sync

impl<J> UnwindSafe for MaybeJoin<J> where
    J: UnwindSafe

impl<J> RefUnwindSafe for MaybeJoin<J> where
    J: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Resource for T where
    T: Any + Send + Sync
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]