[][src]Struct resphys::BodySet

pub struct BodySet { /* fields omitted */ }

Container for bodies, removal is currently performed through PhysicsWorld, but access and modification is possible through this structure

Implementations

impl BodySet[src]

pub fn new() -> Self[src]

pub fn insert(&mut self, body: Body) -> BodyHandle[src]

Inserts a new body into the world and returns it's unique handle.

pub fn get(&self, handle: BodyHandle) -> Option<&Body>[src]

pub fn get_mut(&mut self, handle: BodyHandle) -> Option<&mut Body>[src]

pub fn iter(&self) -> impl Iterator<Item = (BodyHandle, &Body)>[src]

pub fn iter_mut(&mut self) -> impl Iterator<Item = (BodyHandle, &mut Body)>[src]

Trait Implementations

impl Default for BodySet[src]

impl Index<BodyHandle> for BodySet[src]

type Output = Body

The returned type after indexing.

impl IndexMut<BodyHandle> for BodySet[src]

Auto Trait Implementations

impl RefUnwindSafe for BodySet

impl Send for BodySet

impl Sync for BodySet

impl Unpin for BodySet

impl UnwindSafe for BodySet

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> From<T> for T[src]

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

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.