Trait rust_sc2::units::iter::UnitsIterator [−][src]
Helper trait for iterators over units.
Provided methods
fn find_tag(mut self: Self, tag: u64) -> Option<Self::Item>[src]
Searches for unit with given tag and returns it if found.
fn find_tags<T: Container<u64>>(self, tags: &T) -> FindTags<'_, Self, T>ⓘ[src]
Leaves only units with given tags.
fn of_type(self, unit_type: UnitTypeId) -> OfType<Self>ⓘ[src]
Leaves only units of given type.
fn exclude_type(self, unit_type: UnitTypeId) -> ExcludeType<Self>ⓘNotable traits for ExcludeType<I>
impl<I> Iterator for ExcludeType<I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;[src]
Notable traits for ExcludeType<I>
impl<I> Iterator for ExcludeType<I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;Excludes units of given type.
fn of_types<T: Container<UnitTypeId>>(self, types: &T) -> OfTypes<'_, Self, T>ⓘ[src]
Leaves only units of given types.
fn exclude_types<T: Container<UnitTypeId>>(
self,
types: &T
) -> ExcludeTypes<'_, Self, T>ⓘNotable traits for ExcludeTypes<'a, I, T>
impl<'a, I, T> Iterator for ExcludeTypes<'a, I, T> where
I: Iterator,
I::Item: Borrow<Unit>,
T: Container<UnitTypeId>, type Item = I::Item;[src]
self,
types: &T
) -> ExcludeTypes<'_, Self, T>ⓘ
Notable traits for ExcludeTypes<'a, I, T>
impl<'a, I, T> Iterator for ExcludeTypes<'a, I, T> where
I: Iterator,
I::Item: Borrow<Unit>,
T: Container<UnitTypeId>, type Item = I::Item;Excludes units of given types.
fn ground(self) -> Ground<Self>ⓘ[src]
Leaves only non-flying units.
fn flying(self) -> Flying<Self>ⓘ[src]
Leaves only flying units.
fn ready(self) -> Ready<Self>ⓘ[src]
Leaves only ready structures.
fn not_ready(self) -> NotReady<Self>ⓘ[src]
Leaves only structures in-progress.
fn idle(self) -> Idle<Self>ⓘ[src]
Leaves only units with no orders.
fn almost_idle(self) -> AlmostIdle<Self>ⓘNotable traits for AlmostIdle<I>
impl<I> Iterator for AlmostIdle<I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;[src]
Notable traits for AlmostIdle<I>
impl<I> Iterator for AlmostIdle<I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;Leaves only units with no orders or that almost finished their orders.
fn unused(self) -> Unused<Self>ⓘ[src]
Leaves only units with no orders.
Unlike idle this takes reactor on terran buildings into account.
fn almost_unused(self) -> AlmostUnused<Self>ⓘNotable traits for AlmostUnused<I>
impl<I> Iterator for AlmostUnused<I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;[src]
Notable traits for AlmostUnused<I>
impl<I> Iterator for AlmostUnused<I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;Leaves only units with no orders or that almost finished their orders.
Unlike almost_idle this takes reactor on terran buildings into account.
fn visible(self) -> Visible<Self>ⓘ[src]
Leaves only units visible on current step.
fn in_range_of(self, unit: &Unit, gap: f32) -> InRangeOf<'_, Self>ⓘ[src]
Leaves only units in attack range of given unit.
fn in_range(self, unit: &Unit, gap: f32) -> InRange<'_, Self>ⓘ[src]
Leaves only units that are close enough to attack given unit.
fn in_real_range_of(self, unit: &Unit, gap: f32) -> InRealRangeOf<'_, Self>ⓘNotable traits for InRealRangeOf<'a, I>
impl<'a, I> Iterator for InRealRangeOf<'a, I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;[src]
Notable traits for InRealRangeOf<'a, I>
impl<'a, I> Iterator for InRealRangeOf<'a, I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;Leaves only units in attack range of given unit.
Unlike in_range_of this takes range upgrades into account.
fn in_real_range(self, unit: &Unit, gap: f32) -> InRealRange<'_, Self>ⓘNotable traits for InRealRange<'a, I>
impl<'a, I> Iterator for InRealRange<'a, I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;[src]
Notable traits for InRealRange<'a, I>
impl<'a, I> Iterator for InRealRange<'a, I> where
I: Iterator,
I::Item: Borrow<Unit>, type Item = I::Item;Leaves only units that are close enough to attack given unit.
Unlike in_range this takes range upgrades into account.