[−][src]Module handy::typed
This module provides [TypedHandleMap
][typed::TypedHandleMap] and
[TypedHandle
][typed::TypedHandle]. These are wrappers around of
HandleMap
and Handle
which statically prevent trying to use a
Handle
returned from a HandleMap<T>
to get a value out of a
HandleMap<U>
, instead of allowing it to fail at runtime, as it will with
HandleMap
.
For most use cases, this is probably not worth the extra trouble, but it's
provided for completeness, and because the definition of TypedHandle
has
some subtle gotchas.
These abstractions are thin. Methods exist to go bidirectionally to and from
both TypedHandleMap<T>
to HandleMap<T>
and TypedHandle<T>
to Handle
.
You shouldn't need to do this, but restricting it seems needless.
Structs
TypedHandle | A |
TypedHandleMap | A |