[][src]Struct rapier3d::data::arena::Index

pub struct Index { /* fields omitted */ }

An index (and generation) into an Arena.

To get an Index, insert an element into an Arena, and the Index for that element will be returned.

Examples

This example is not tested
use rapier::data::arena::Arena;

let mut arena = Arena::new();
let idx = arena.insert(123);
assert_eq!(arena[idx], 123);

Implementations

impl Index[src]

pub fn from_raw_parts(a: usize, b: u64) -> Index[src]

Create a new Index from its raw parts.

The parts must have been returned from an earlier call to into_raw_parts.

Providing arbitrary values will lead to malformed indices and ultimately panics.

pub fn into_raw_parts(self) -> (usize, u64)[src]

Convert this Index into its raw parts.

This niche method is useful for converting an Index into another identifier type. Usually, you should prefer a newtype wrapper around Index like pub struct MyIdentifier(Index);. However, for external types whose definition you can't customize, but which you can construct instances of, this method can be useful.

Trait Implementations

impl Clone for Index[src]

impl Copy for Index[src]

impl Debug for Index[src]

impl Eq for Index[src]

impl Hash for Index[src]

impl<T> Index<Index> for Arena<T>[src]

type Output = T

The returned type after indexing.

impl Index<Index> for RigidBodySet[src]

type Output = RigidBody

The returned type after indexing.

impl Index<Index> for ColliderSet[src]

type Output = Collider

The returned type after indexing.

impl<T> IndexMut<Index> for Arena<T>[src]

impl IndexMut<Index> for RigidBodySet[src]

impl IndexMut<Index> for ColliderSet[src]

impl Ord for Index[src]

impl PartialEq<Index> for Index[src]

impl PartialOrd<Index> for Index[src]

impl StructuralEq for Index[src]

impl StructuralPartialEq for Index[src]

Auto Trait Implementations

impl RefUnwindSafe for Index

impl Send for Index

impl Sync for Index

impl Unpin for Index

impl UnwindSafe for Index

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CollisionObjectHandle for T where
    T: 'static + PartialEq<T> + Eq + Send + Copy + Sync + Hash
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<N> NodeTrait for N where
    N: Copy + Ord + Hash
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<T> Slottable for T where
    T: Copy
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,