[−][src]Struct resphys::BodySet
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.
fn index(&self, index: BodyHandle) -> &Body
[src]
impl IndexMut<BodyHandle> for BodySet
[src]
fn index_mut(&mut self, index: BodyHandle) -> &mut Body
[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]
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,