enum_tag/
lib.rs

1#![no_std]
2
3pub use enum_tag_macro::EnumTag;
4
5/// Trait implemented by `enum` types.
6///
7/// This trait usually is implemented via `#[derive(EnumTag)]`.
8pub trait EnumTag {
9    /// The type of the `enum`'s tag.
10    type Tag;
11
12    /// Returns the tag of `self` where `Self` is a Rust `enum` type.
13    fn tag(&self) -> Self::Tag;
14}