Macro indexed::impl_indexed [−][src]
Implements Indexed
for a given type, using a given field as index storage of a given type which can be converted from/to usize
using as
.
Examples
#[macro_use] extern crate indexed; use indexed::{Indexed,Pool}; struct Name { id: u32, text: String }; impl_indexed!{ Name{ id: u32 }} let mut _pool = Pool::<Name>::new();