Removes component from entities.
Type of the removed component.
Loading content...Removes component in entity
, if the entity had a component, they will be returned.
Multiple components can be removed at the same time using a tuple.
use shipyard::{Remove, ViewMut, World};
let mut world = World::new();
let entity = world.add_entity((0usize, 1u32));
let (mut usizes, mut u32s) = world.borrow::<(ViewMut<usize>, ViewMut<u32>)>().unwrap();
let old = (&mut usizes, &mut u32s).remove(entity);
assert_eq!(old, (Some(0), Some(1)));
Loading content...impl<ViewA: Remove, ViewB: Remove, ViewC: Remove, ViewD: Remove, ViewE: Remove> Remove for (ViewA, ViewB, ViewC, ViewD, ViewE)
[src]
impl<ViewA: Remove, ViewB: Remove, ViewC: Remove, ViewD: Remove, ViewE: Remove, ViewF: Remove> Remove for (ViewA, ViewB, ViewC, ViewD, ViewE, ViewF)
[src]
impl<ViewA: Remove, ViewB: Remove, ViewC: Remove, ViewD: Remove, ViewE: Remove, ViewF: Remove, ViewG: Remove> Remove for (ViewA, ViewB, ViewC, ViewD, ViewE, ViewF, ViewG)
[src]
impl<ViewA: Remove, ViewB: Remove, ViewC: Remove, ViewD: Remove, ViewE: Remove, ViewF: Remove, ViewG: Remove, ViewH: Remove> Remove for (ViewA, ViewB, ViewC, ViewD, ViewE, ViewF, ViewG, ViewH)
[src]
impl<ViewA: Remove, ViewB: Remove, ViewC: Remove, ViewD: Remove, ViewE: Remove, ViewF: Remove, ViewG: Remove, ViewH: Remove, ViewI: Remove> Remove for (ViewA, ViewB, ViewC, ViewD, ViewE, ViewF, ViewG, ViewH, ViewI)
[src]
impl<ViewA: Remove, ViewB: Remove, ViewC: Remove, ViewD: Remove, ViewE: Remove, ViewF: Remove, ViewG: Remove, ViewH: Remove, ViewI: Remove, ViewJ: Remove> Remove for (ViewA, ViewB, ViewC, ViewD, ViewE, ViewF, ViewG, ViewH, ViewI, ViewJ)
[src]
Loading content...Loading content...