macro_rules! impl_dynamic_node_id {
($outer:ty, $internal:ty, $field:tt) => { ... };
}Expand description
Implements dynamic::NodeId trait for the given node ID type.
ยงExamples
use treena::impl_dynamic_node_id;
use treena::dynamic::NodeIdUsize;
// Tuple struct.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MyId(NodeIdUsize);
impl_dynamic_node_id!(MyId, NodeIdUsize, 0);
// Struct.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MyId2 {
underlying: NodeIdUsize,
};
impl_dynamic_node_id!(MyId2, NodeIdUsize, underlying);