closed-trait 0.1.1

Seal a trait to a fixed set of types, and generate an enum and match macro over them
Documentation
1
2
3
4
5
6
7
8
9
10
11
use closed_trait::{enumerate, sealed};

pub struct Square;

#[enumerate(attrs = "/// Hand-written docs")]
#[sealed(Square)]
pub trait Shape {}

impl Shape for Square {}

fn main() {}