[−][src]Struct rapier2d::data::arena::Index
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
[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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Index<Index> for Arena<T>
[src]
type Output = T
The returned type after indexing.
fn index(&self, index: Index) -> &Self::Output
[src]
impl Index<Index> for RigidBodySet
[src]
type Output = RigidBody
The returned type after indexing.
fn index(&self, index: RigidBodyHandle) -> &RigidBody
[src]
impl Index<Index> for ColliderSet
[src]
type Output = Collider
The returned type after indexing.
fn index(&self, index: ColliderHandle) -> &Collider
[src]
impl<T> IndexMut<Index> for Arena<T>
[src]
impl IndexMut<Index> for RigidBodySet
[src]
fn index_mut(&mut self, index: RigidBodyHandle) -> &mut RigidBody
[src]
impl IndexMut<Index> for ColliderSet
[src]
fn index_mut(&mut self, index: ColliderHandle) -> &mut Collider
[src]
impl Ord for Index
[src]
fn cmp(&self, other: &Index) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Index> for Index
[src]
impl PartialOrd<Index> for Index
[src]
fn partial_cmp(&self, other: &Index) -> Option<Ordering>
[src]
fn lt(&self, other: &Index) -> bool
[src]
fn le(&self, other: &Index) -> bool
[src]
fn gt(&self, other: &Index) -> bool
[src]
fn ge(&self, other: &Index) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CollisionObjectHandle for T where
T: 'static + PartialEq<T> + Eq + Send + Copy + Sync + Hash,
[src]
T: 'static + PartialEq<T> + Eq + Send + Copy + Sync + Hash,
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<N> NodeTrait for N where
N: Copy + Ord + Hash,
[src]
N: Copy + Ord + Hash,
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]
T: PartialEq<T> + Copy + Any + Debug,
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,