The current API concerning our Composite type and its self-updating structs is quite unpleasant to use.
[x] Abstract Arc<RwLock<T: Composite + Clone + Debug + Updateable>> away into something much nicer
[x] Eliminate need to call Arc::new(RwLock::new(...)) when wanting to create a self-updating struct
[ ] Find shorthand/replacement API for .read().unwrap() when wanting to read from a self-updating struct
[ ] Find shorthand/replacement API for .write().unwrap() when wanting to write to a self-updating struct
Edit: With the changes made by the first two points, the API has already become more pleasant to use, in my opinion. Calling .read() or .write() cannot be avoided due to how RwLocks work, without making significant changes to the architecture of self updating structs
The current API concerning our
Composite
type and its self-updating structs is quite unpleasant to use.Arc<RwLock<T: Composite + Clone + Debug + Updateable>>
away into something much nicerArc::new(RwLock::new(...))
when wanting to create a self-updating struct[ ] Find shorthand/replacement API for.read().unwrap()
when wanting to read from a self-updating struct[ ] Find shorthand/replacement API for.write().unwrap()
when wanting to write to a self-updating structEdit: With the changes made by the first two points, the API has already become more pleasant to use, in my opinion. Calling .read() or .write() cannot be avoided due to how RwLocks work, without making significant changes to the architecture of self updating structs