blob: 330ef3593180ae323cc3040196ebb5f1643227f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
use std::collections::HashMap;
use std::iter::Iterator;
#[derive(Debug, Clone, PartialEq)]
/// A game entity
pub struct Entity {
pub attributes: HashMap<String, String>,
}
pub trait HasEntities {
type EntitiesIter<'a>: Iterator<Item = &'a Entity>;
fn entities_iter(&self) -> Self::EntitiesIter<'_>;
}
|