pub struct Shots<const N: usize> { /* private fields */ }Implementations§
Source§impl<const N: usize> Shots<N>
impl<const N: usize> Shots<N>
pub fn new(capacity: usize) -> Self
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
pub fn spawn(&mut self, shot: Shot<N>) -> Option<ShotId>
pub fn despawn(&mut self, id: ShotId) -> Option<Shot<N>>
pub fn contains(&self, id: ShotId) -> bool
pub fn get(&self, id: ShotId) -> Option<&Shot<N>>
pub fn get_mut(&mut self, id: ShotId) -> Option<&mut Shot<N>>
pub fn swept(&self, id: ShotId) -> Option<Span<N>>
pub fn iter(&self) -> impl Iterator<Item = (ShotId, &Shot<N>)>
pub fn step(&mut self, bounds: Span<N>) -> &[(ShotId, End)]
pub fn ended(&self) -> &[(ShotId, End)]
pub fn boxes<B: From<Span<N>>>(&self, ids: &mut Vec<ShotId>, boxes: &mut Vec<B>)
pub fn resolve<B: Copy + Into<Span<N>>>( &mut self, ids: &[ShotId], hits: &[Hit], targets: &[B], accept: impl FnMut(ShotId, u32) -> bool, ) -> &[Strike<N>]
pub fn clear(&mut self)
Trait Implementations§
impl<const N: usize> Eq for Shots<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Shots<N>
impl<const N: usize> RefUnwindSafe for Shots<N>
impl<const N: usize> Send for Shots<N>
impl<const N: usize> Sync for Shots<N>
impl<const N: usize> Unpin for Shots<N>
impl<const N: usize> UnsafeUnpin for Shots<N>
impl<const N: usize> UnwindSafe for Shots<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more