Struct heron::rapier_plugin::rapier::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

use rapier::data::arena::Arena;

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

Implementations

impl Index

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

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)

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

impl Copy for Index

impl Debug for Index

impl Eq for Index

impl Hash for Index

impl Index<Index> for ColliderSet

type Output = Collider

The returned type after indexing.

impl<T> Index<Index> for Arena<T>

type Output = T

The returned type after indexing.

impl Index<Index> for RigidBodySet

type Output = RigidBody

The returned type after indexing.

impl IndexMut<Index> for RigidBodySet

impl IndexMut<Index> for ColliderSet

impl<T> IndexMut<Index> for Arena<T>

impl Ord for Index

impl PartialEq<Index> for Index

impl PartialOrd<Index> for Index

impl StructuralEq for Index

impl StructuralPartialEq for Index

Auto Trait Implementations

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> CallHasher for T where
    T: Hash + ?Sized

impl<T> CloneAny for T where
    T: Clone + Any

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

impl<T> Component for T where
    T: 'static + Send + Sync

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> Instrument 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> Pointable for T

type Init = T

The type for initializers.

impl<T> Resource for T where
    T: 'static + Send + Sync

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>, 

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<T> TypeData for T where
    T: 'static + Send + Sync + Clone

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