Add specifying constructor function
HampusMat opened this issue · 1 comments
HampusMat commented
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 }
}
}