runtime_injector icon indicating copy to clipboard operation
runtime_injector copied to clipboard

Improve ergonomics

Open TehPers opened this issue 3 years ago • 0 comments

  • Relaxed constraints for ServiceFactory
    • Moved Service constraint to the provider implementations
    • Result only constrained by Any rather than Service
  • ServiceFactory::invoke now takes &self, meaning it doesn't need to be locked to be used in a thread-safe manner
    • Implemented on Fn rather than FnMut now
    • Neither FallibleServiceFactory nor the Fn (previously FnMut) implementations need &mut self

TehPers avatar May 27 '21 19:05 TehPers