pub struct BodyHandle(/* private fields */);Expand description
Opaque handle to a body inside a simulation.
The simulation maps it onto its own storage; callers treat it as an opaque key. Handles order deterministically, so a pair of them makes a stable map key.
Implementations§
Source§impl BodyHandle
impl BodyHandle
Sourcepub const fn from_parts(index: u32, generation: u32) -> Self
pub const fn from_parts(index: u32, generation: u32) -> Self
Build a handle from a slot index and generation.
Sourcepub const fn generation(self) -> u32
pub const fn generation(self) -> u32
The generation this handle was minted at.
Trait Implementations§
Source§impl Clone for BodyHandle
impl Clone for BodyHandle
Source§fn clone(&self) -> BodyHandle
fn clone(&self) -> BodyHandle
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 BodyHandle
Source§impl Debug for BodyHandle
impl Debug for BodyHandle
impl Eq for BodyHandle
Source§impl Hash for BodyHandle
impl Hash for BodyHandle
Source§impl Ord for BodyHandle
impl Ord for BodyHandle
Source§fn cmp(&self, other: &BodyHandle) -> Ordering
fn cmp(&self, other: &BodyHandle) -> 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 BodyHandle
impl PartialEq for BodyHandle
Source§impl PartialOrd for BodyHandle
impl PartialOrd for BodyHandle
impl StructuralPartialEq for BodyHandle
Auto Trait Implementations§
impl Freeze for BodyHandle
impl RefUnwindSafe for BodyHandle
impl Send for BodyHandle
impl Sync for BodyHandle
impl Unpin for BodyHandle
impl UnsafeUnpin for BodyHandle
impl UnwindSafe for BodyHandle
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