uazu / qcell

Statically-checked alternatives to RefCell and RwLock
Apache License 2.0
356 stars 22 forks source link

Consider adding generic cell-owner and cell types, to handle alternative key-management approaches #18

Open uazu opened 3 years ago

uazu commented 3 years ago

If someone wants to do their own key management (e.g. u64 key, panic on exhaustion instead of free list, etc), then have some types that they can plug their own 'key' type into, and that does the cell borrowing handling for them. These would typically be wrapped in type aliases to make them more ergonomic.

It might be necessary to have two sets of these, for each of TLCell-like and TCell-like, i.e. with or without Sync access to the cells.