Trait heron::rapier_plugin::rapier3d::data::ComponentSetMut [−]
pub trait ComponentSetMut<T>: ComponentSet<T> {
fn map_mut_internal<Result>(
&mut self,
handle: Index,
f: impl FnOnce(&mut T) -> Result
) -> Option<Result>;
fn set_internal(&mut self, handle: Index, val: T);
}
Expand description
A set of mutable elements of type T
.
Required methods
fn map_mut_internal<Result>(
&mut self,
handle: Index,
f: impl FnOnce(&mut T) -> Result
) -> Option<Result>
fn map_mut_internal<Result>(
&mut self,
handle: Index,
f: impl FnOnce(&mut T) -> Result
) -> Option<Result>
Applies the given closure to the element associated to the given handle
.
Return None
if the element doesn’t exist.
fn set_internal(&mut self, handle: Index, val: T)
fn set_internal(&mut self, handle: Index, val: T)
Set the value of this element.