pub fn filter<F>(&self, f: F) -> Self
	where
		F: Fn(&&Unit) -> bool,
	{
		Self(self.iter().filter(f).map(|u| (u.tag(), u.clone())).collect())
	}
/// Leaves only units that match given predicate and makes new collection of them.
///
/// Warning: This method will clone units in order to create a new collection
/// and will be evaluated initially. When applicable prefer using [`filter`]
/// on the iterator over units, since it's lazily evaluated and doesn't do any cloning operations.
///
/// [`filter`]: UnitsIterator::filter
Leaves only units that match given predicate and makes new collection of them.
Warning: This method will clone units in order to create a new collection
and will be evaluated initially. When applicable prefer using [`filter`]
on the iterator over units, since it's lazily evaluated and doesn't do any cloning operations.


Leaves only units that match given predicate and makes new collection of them . Warning : This method will clone units in order to create a new collection and will be evaluated initially . When applicable prefer using [ ` filter ` ] on the iterator over units since it ' s lazily evaluated and doesn ' t do any cloning operations .
pub fn filter<F>(&self, f: F) -> Self
	where
		F: Fn(&&Unit) -> bool,
	{
		Self(self.iter().filter(f).map(|u| (u.tag(), u.clone())).collect())
	}
pub fn filter < F > ( & self , f : F ) -> Self where F : Fn ( & & Unit ) -> bool , { Self ( self . iter ( ) . filter ( f ) . map ( | u | ( u . tag ( ) , u . clone ( ) ) ) . collect ( ) ) }
Leaves only units that match given predicate and makes new collection of them.
Leaves only units that match given predicate and makes new collection of them .
&self
f
F
&self
f
F