teloc icon indicating copy to clipboard operation
teloc copied to clipboard

Respect mutability?

Open oriontvv opened this issue 2 years ago • 1 comments

Hello, thanks for this crate! I would like to know if it's possible to resolve an mutable instance from ServiceProvider? Or do you consider such feature?

oriontvv avatar Oct 10 '23 08:10 oriontvv

Hi, crate isn't intended to be used with mutable references, but you can use interior mutability types (RefMut or Mutex).

Also, you can try to implement mutable references resolving like here but I don't know if borrow checker allows this.

p0lunin avatar Oct 11 '23 12:10 p0lunin