Function bones_lib::ecs::entities::OptionalMut
pub fn OptionalMut<'a, T, C, S>(
component_ref: &'a mut S,
) -> OptionalQueryItemMut<'a, T, S>Expand description
Helper func to construct a OptionalQueryItemMut wrapping a CompMut SystemParam.
Used to iterate over enities optionally and mutably retrieving components from ComponentStore.
Entities iterated over will not be filtered by this QueryItem.
This example filters entities by compC, optionally retrieves compA as mutable, and
compB as immutable.
entities.iter_with(&mut OptionalMut(&mut compA), &Optional(&compB), &compC)
This will implement QueryItem as long as generic type implements std::ops::DerefMut for
ComponentStore, such as CompMut.