traitful 0.3.0

A collection of helper macros for trait patterns
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use traitful::seal;

pub struct Newtype<T>(T);

impl<T> MaybeGeneric for Newtype<T> {}

pub struct UnitStruct;

impl MaybeGeneric for UnitStruct {}

#[seal(for<T> Newtype<T>, UnitStruct)]
pub trait MaybeGeneric {}