Macro components_arena::NewtypeComponentId[][src]

macro_rules! NewtypeComponentId {
    (() $vis : vis struct $name : ident $($body : tt) *) => { ... };
}
Expand description

Macro attribute for deriving ComponentId trait.

Examples

use components_arena::{Component, Id, NewtypeComponentId};
use phantom_type::PhantomType;

macro_attr! {
    #[derive(Educe, NewtypeComponentId!)]
    #[educe(Debug, Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)]
    pub struct Item<Tag, X>(Id<ItemNode<Tag>>, PhantomType<X>);
}