ardaku/traitful

Add `#[require]` macro (or different name)

Opened this issue · 1 comments

Required traits are like supertraits, except that if they are not object safe, they do not compromise the object safety of the subtrait.

Better API:

#[require(Clone)]
pub trait Trait {
    fn clone_boxed(self: &impl Clone + 'static) -> Box<dyn Trait> {
        Box::new(self.clone())
    }
}