Struct limn_core::resources::Map
[−]
[src]
pub struct Map<I, T> { /* fields omitted */ }
Map for a given Id
and resource type.
Methods
impl<I: Id, T> Map<I, T>
[src]
pub fn new() -> Self
[src]
pub fn get(&self, id: I) -> Option<&T>
[src]
Borrow the resource associated with the given Id
.
pub fn insert(&mut self, resource: T) -> I
[src]
Adds the given resource to the Map
and returns a unique Id
for it.