components-arena 3.2.2

Simple library for creating complex domain-specific self-referential data structures.
Documentation
1
2
3
4
5
6
7
8
9
impl<C: Component> const ComponentId for Id<C> {
    fn from_raw(raw: RawId) -> Self {
        Id { index: raw.0, guard: raw.1, phantom: PhantomType::new() }
    }

    fn into_raw(self) -> RawId {
        (self.index, self.guard)
    }
}