Comments (3)
Okay, that would likely be useful for people using LCell. It would probably be best to add this as a Cargo feature. Is it just a matter of adding a new constructor to LCellOwner? I guess the existing LCell doc-tests would have to be duplicated for generativity.
from qcell.
it's just a matter of replacing LCellOwner::scope
with LCellOwner::new
, which takes a Guard
. It could be behind a feature flag.
from qcell.
What I'm trying to ask is whether this is a simple add-on to the existing LCellOwner type, or whether it has to be a completely different type. It would be a breaking change to remove LCellOwner::scope
. Looking at your fork, Id
is a type from generativity
. Generativity's Id
has a couple of extra terms compared to qcell's, but the author doesn't explain why they are there. According to my reading of the Rustonomicon, they are not necessary, and they restrict UnwindSafe, so I think we should not use their Id
. So the question is whether you can implement this as an addition, i.e. just add LCellOwner::new
that accepts a generativity Guard. If that looks like it would work and be safe, I think this would be fine. I'd prefer it to be behind a feature flag so that people who don't need it don't get an extra dependency to consider in their safety review.
from qcell.
Related Issues (20)
- A new architecture HOT 14
- Cell type that uses address of cell owner as key HOT 4
- T: ?Sized support HOT 6
- Consider adding `rw` and `ro` calls to cells, for convenience HOT 1
- Consider adding generic cell-owner and cell types, to handle alternative key-management approaches
- Support moving a cell to a new ownership
- `TCell` is unsound due to covariant `Q` parameter of `TCellOwner` (and the same applies to `TLCell`) HOT 4
- Seek motivating example for more than 3 simultaneous borrows HOT 6
- IntrusiveQCellOwner? HOT 13
- Be aware of pointer provenance HOT 3
- Retrieving the wrapped value from `QCell` and friends HOT 4
- qcell + selfref? HOT 7
- Zero-sized LCellOwner APIs? HOT 20
- Default is not implemented for LCell HOT 1
- Debugging ergonomics? HOT 2
- Access nested cells with the same owner HOT 3
- Supporting TCell without std or exclusion-set HOT 15
- `rwn` to borrow `N` cells HOT 1
- Safer (checked) `QCellOwnerSeq::new` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qcell.