- [x] Maybe rename `Capsule` to `TraditionalCapsule` to accommodate the future addition of coroutines (to prevent breaking change or ugly API), and then have a private `Capsule` trait that `TraditionalCapsule` has a blanket impl for.
- [x] Make `Capsule` (or `TraditionalCapsule`) take `From<CapsuleHandle>` as input so that capsules can be defined with just `CapsuleReader` or `SideEffectRegistrar` parameters.
- Not possible because the `From<CapsuleHandle>` results in an unconstrained type parameter.
- [x] Maybe make `Container::with_read_txn`, `Container::with_write_txn`, `ContainerReadTxn`, and `ContainerWriteTxn` crate private for a 1.0.0 to allow for extensibility or changes in the future
- Although I do understand the use-cases for making them public for others to interop with.
- Maybe we can make an "experimental" feature so people that want to use them probably can, at the cost of having to pin ReArch to a particular version.
- Update: moved all of these APIs under the `experimental-txn` feature.
- [x] Test `MockCapsuleReaderBuilder`
This issue only covers the 1.0.0 for the
rearch
crate. The other crates are not close to a 1.0, mostly due to limitations in the Rust compiler.TODO:
Capsule::key
just returns animpl Hash + Eq + ...
SideEffectRegister::register
and instead have people calleffect().build(register)
for untilexperimental-api
stabilizesCapsuleReader::get
andCapsuleReader::as_ref
get
is redundant/non-descriptive, andas_ref
breaks Rust naming conventions.get.get
. I am keepingget.as_ref
as-is for now, but am looking for new naming suggestions.get.as_ref(some_capsule)
andget(some_capsule)
(for returning a clone)Container
/ContainerReadTxn
/ContainerWriteTxn
'sxyz_read
andxyz_read_ref
be named as such?xyz_read_ref
->xyz_read
?experimental-txn
featureCapsuleReader
and the less-ergonomicSideEffectRegistrar
[capsule]
fn count_capsule() -> u32 { yield Get(count_manager).0 }