pub struct BodyId { /* private fields */ }Expand description
A stable generational handle to a Body within a crate::World.
指向 crate::World 中某个 Body 的稳定代际句柄。
It becomes permanently invalid once that Body is removed: the slot’s generation advances, so a stale handle is rejected rather than silently addressing whatever Body reuses the slot. 该 Body 被移除后此句柄永久失效:槽位的代际会递增,因此过期句柄会被拒绝,而不会静默 地指向复用该槽位的另一个 Body。
Implementations§
Trait Implementations§
impl Copy for BodyId
impl Eq for BodyId
Source§impl Ord for BodyId
impl Ord for BodyId
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for BodyId
impl PartialOrd for BodyId
impl StructuralPartialEq for BodyId
Auto Trait Implementations§
impl Freeze for BodyId
impl RefUnwindSafe for BodyId
impl Send for BodyId
impl Sync for BodyId
impl Unpin for BodyId
impl UnsafeUnpin for BodyId
impl UnwindSafe for BodyId
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