pub struct ColliderId(/* private fields */);Expand description
Opaque handle to a collider stored in a CollisionManager.
Returned by CollisionManager::insert_collider and used to address that
specific collider later (replace, remove, query). Distinct from the object
index I: a ColliderId identifies one stored collider uniquely, whereas
several colliders may share the same object index I.
An id is only valid until its collider is removed. Ids are not
generational: CollisionManager::remove_collider frees the slot, and the
next insert reuses it. A retained id then silently refers to the new
collider in that slot rather than failing. Dropping ids of removed colliders
is the caller’s responsibility; this crate favours efficiency over guarding
against it.
Trait Implementations§
Source§impl Clone for ColliderId
impl Clone for ColliderId
Source§fn clone(&self) -> ColliderId
fn clone(&self) -> ColliderId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ColliderId
Source§impl Debug for ColliderId
impl Debug for ColliderId
impl Eq for ColliderId
Source§impl Hash for ColliderId
impl Hash for ColliderId
Source§impl Ord for ColliderId
impl Ord for ColliderId
Source§fn cmp(&self, other: &ColliderId) -> Ordering
fn cmp(&self, other: &ColliderId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ColliderId
impl PartialEq for ColliderId
Source§impl PartialOrd for ColliderId
impl PartialOrd for ColliderId
impl StructuralPartialEq for ColliderId
Auto Trait Implementations§
impl Freeze for ColliderId
impl RefUnwindSafe for ColliderId
impl Send for ColliderId
impl Sync for ColliderId
impl Unpin for ColliderId
impl UnsafeUnpin for ColliderId
impl UnwindSafe for ColliderId
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