retain

Function retain 

Source
pub fn retain<T>() -> impl EntityCommand
where T: Bundle,
Expand description

An EntityCommand that removes all components from an entity, except for those in the given Bundle.