pub struct TileView<'a, 'e, K, C> { /* private fields */ }
Expand description
A single Environment tile as seen by a single Entity.
Implementations§
Source§impl<'a, 'e, K, C> TileView<'a, 'e, K, C>
impl<'a, 'e, K, C> TileView<'a, 'e, K, C>
Sourcepub fn entities(&self) -> impl Iterator<Item = &EntityTrait<'e, K, C>>
pub fn entities(&self) -> impl Iterator<Item = &EntityTrait<'e, K, C>>
Gets an iterator over all the entities located in this Tile that does not include the Entity that is seeing the tile.
The entities are returned in arbitrary order.
Sourcepub fn entities_mut(
&mut self,
) -> impl Iterator<Item = &mut EntityTrait<'e, K, C>>
pub fn entities_mut( &mut self, ) -> impl Iterator<Item = &mut EntityTrait<'e, K, C>>
Gets an iterator over all the mutable entities located in this Tile that does not include the Entity that is seeing the tile.
The entities are returned in arbitrary order.
Source§impl<'a, 'e, K: PartialEq, C> TileView<'a, 'e, K, C>
impl<'a, 'e, K: PartialEq, C> TileView<'a, 'e, K, C>
Sourcepub fn contains_kind(&self, kind: K) -> bool
pub fn contains_kind(&self, kind: K) -> bool
Returns true only if this Tile contains an Entity of the given Kind, without considering the Entity that is seeing the tile.
Sourcepub fn count_kind(&self, kind: K) -> usize
pub fn count_kind(&self, kind: K) -> usize
Gets the total number of entities in this Tile of the given Kind, without considering the Entity that is seeing the tile.
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'e, K, C> Freeze for TileView<'a, 'e, K, C>
impl<'a, 'e, K, C> !RefUnwindSafe for TileView<'a, 'e, K, C>
impl<'a, 'e, K, C> !Send for TileView<'a, 'e, K, C>
impl<'a, 'e, K, C> !Sync for TileView<'a, 'e, K, C>
impl<'a, 'e, K, C> Unpin for TileView<'a, 'e, K, C>
impl<'a, 'e, K, C> !UnwindSafe for TileView<'a, 'e, K, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more