pub(crate) struct TargetWorkspace {
candidates: Vec<EnemyIdx>,
candidate_count: usize,
targets: Vec<EnemyIdx>,
target_count: usize,
}Fields§
§candidates: Vec<EnemyIdx>§candidate_count: usize§targets: Vec<EnemyIdx>§target_count: usizeImplementations§
Source§impl TargetWorkspace
impl TargetWorkspace
pub(crate) fn new(target_capacity: usize) -> Self
pub(crate) fn clear(&mut self)
pub(crate) fn candidate_storage(&mut self) -> &mut [EnemyIdx]
pub(crate) fn set_candidate_count(&mut self, count: usize)
pub(crate) fn candidates(&self) -> &[EnemyIdx]
pub(crate) const fn candidate_count(&self) -> usize
pub(crate) fn candidate_at(&self, index: usize) -> Option<EnemyIdx>
pub(crate) fn retain_candidates(&mut self, keep: impl FnMut(EnemyIdx) -> bool)
pub(crate) fn retain_candidates_excluding_targets( &mut self, keep: impl FnMut(EnemyIdx) -> bool, )
pub(crate) fn push_target(&mut self, target: EnemyIdx)
pub(crate) fn contains_target(&self, target: EnemyIdx) -> bool
pub(crate) fn targets(&self) -> &[EnemyIdx]
pub(crate) fn truncate_targets(&mut self, count: usize)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TargetWorkspace
impl RefUnwindSafe for TargetWorkspace
impl Send for TargetWorkspace
impl Sync for TargetWorkspace
impl Unpin for TargetWorkspace
impl UnsafeUnpin for TargetWorkspace
impl UnwindSafe for TargetWorkspace
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more