HampusMat/Syrette

Add specifying constructor function

HampusMat opened this issue · 1 comments

Currently, constructors are expected to be functions called "new".

A flag could be added to the injectable macro that overrides this.

It would look like this

#[injectable(IFoo, constructor = create)]
impl Foo
{
    fn create(bar: TransientPtr<dyn IBar>) -> Self
    {
        Self { bar }
    }
}

Completed with a3ccc27