pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) { ... }
Expand description
Declare an Arena
containing one dropless arena and many typed arenas (the
types of the typed arenas are specified by the arguments).
There are three cases of interest.
- Types that are
Copy
: these need not be specified in the arguments. They will use theDroplessArena
. - Types that are
!Copy
and!Drop
: these must be specified in the arguments. An emptyTypedArena
will be created for each one, but theDroplessArena
will always be used and theTypedArena
will stay empty. This is odd but harmless, because an empty arena allocates no memory. - Types that are
!Copy
andDrop
: these must be specified in the arguments. TheTypedArena
will be used for them.