polyphony-chat / chorus

A Rust library for interacting with multiple Polyphony- and Spacebar-Compatible instances at once.
https://crates.io/crates/chorus
Mozilla Public License 2.0
16 stars 7 forks source link

API improvements for self-updating structs #466

Closed bitfl0wer closed 7 months ago

bitfl0wer commented 7 months ago

The current API concerning our Composite type and its self-updating structs is quite unpleasant to use.

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