[][src]Macro nuts::domain_enum

macro_rules! domain_enum {
    ( $e:tt ) => { ... };
}

Implements DomainEnumeration for an enum.

This macro can only be used on primitive enums that implement Copy. The current implementation of the macro unfortunately also requires DomainEnumeration to be imported with this exact name.

Example:

#[macro_use] extern crate nuts;
use nuts::{domain_enum, DomainEnumeration};
#[derive(Clone, Copy)]
enum MyDomain {
    DomainA,
    DomainB,
}
domain_enum!(MyDomain);