Trait shipyard::Shiperator[][src]

pub trait Shiperator {
    type Item;
Show 14 methods fn size_hint(&self) -> (usize, Option<usize>); fn next(&mut self) -> Option<Self::Item> { ... }
fn for_each<F>(self, f: F)
    where
        Self: Sized,
        F: FnMut(Self::Item)
, { ... }
fn try_for_each<F, E>(&mut self, f: F) -> Result<(), E>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> Result<(), E>
, { ... }
fn fold<Acc, F>(self, acc: Acc, f: F) -> Acc
    where
        Self: Sized,
        F: FnMut(Acc, Self::Item) -> Acc
, { ... }
fn try_fold<Acc, F, E>(&mut self, acc: Acc, f: F) -> Result<Acc, E>
    where
        Self: Sized,
        F: FnMut(Acc, Self::Item) -> Result<Acc, E>
, { ... }
fn enumerate(self) -> Enumerate<Self>
    where
        Self: Sized
, { ... }
fn with_id(self) -> WithId<Self>
    where
        Self: Sized + CurrentId
, { ... }
fn filter<P>(self, pred: P) -> Filter<Self, P>
    where
        Self: Sized,
        P: FnMut(&Self::Item) -> bool
, { ... }
fn count(self) -> usize
    where
        Self: Sized
, { ... }
fn map<R, F>(self, f: F) -> Map<Self, F>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> R
, { ... }
fn find<P>(&mut self, pred: P) -> Option<Self::Item>
    where
        Self: Sized,
        P: FnMut(&Self::Item) -> bool
, { ... }
fn into_iterator(self) -> IntoIterator<Self>
    where
        Self: Sized
, { ... }
fn collect<C: FromIterator<Self::Item>>(self) -> C
    where
        Self: Sized
, { ... }
}
Expand description

Iterator-like trait able to make the difference between visited and yielded components.

Associated Types

Required methods

Returns the minimum number of components yielded and maybe the maximum.

Provided methods

Returns the next component.

Visits all components and apply f.

Visits all components and apply f, can return early.

Visits all components, apply f and store the result in acc.

Visits all components, apply f and store the result in acc, can return early.

Returns the current iteration count as well as component(s).

Returns EntityId as well as component(s).

Skips components that doesn’t match pred.

Consumes the shiperator and counts the number of iterations.

Applies f to all visited components.
Using it on an update packed storages will flag entities even if they’re not yielded at the end.

Searches component(s) that matches pred.

Transforms a shiperator into an iterator, allowing the use of for loop and crates such as itertools.
Iterator doesn’t know about update pack so it’ll flag everything it visits.

Collects this shiperator into a collection.

Implementations on Foreign Types

Implementors