Commit Graph

19 Commits

Author SHA1 Message Date
bitfl0wer d73c1963fc Start refactoring ChorusRequest to ChorusRequest::new() 2023-08-25 00:02:26 +02:00
bitfl0wer adf3d4ef31 Update test a little 2023-08-17 18:23:57 +02:00
bitfl0wer 7c8ad3ffcf Rewrite recursive update test (still fails sob) 2023-08-16 22:04:24 +02:00
bitfl0wer fbf72b74d0 Remove tokio watch channels 2023-08-16 21:26:19 +02:00
bitfl0wer e9f94267c6 Add recursive-updating-structs test 2023-08-16 14:06:04 +02:00
bitfl0wer e0340047fb Remove import 2023-08-16 01:11:48 +02:00
bitfl0wer e43fe061b3 Refactor test 2023-08-16 01:11:32 +02:00
bitfl0wer a9381fec1e Revert "Give `GatewayHandle` and `Gateway` common trait to call `watch_whole()` or observe() from a `Gateway`"
This reverts commit d36b1de170.
2023-08-16 00:21:18 +02:00
bitfl0wer d36b1de170 Give `GatewayHandle` and `Gateway` common trait to call `watch_whole()` or observe() from a `Gateway` 2023-08-16 00:18:32 +02:00
bitfl0wer 2fd1a7e7f4 Remove unused import 2023-08-15 20:30:30 +02:00
bitfl0wer c03b250248 Clean up test 2023-08-15 20:20:58 +02:00
bitfl0wer c3be91667b Try calling new method to see if it panics 2023-08-15 17:54:48 +02:00
bitfl0wer c0c873d460 Update test to match code changes 2023-08-13 16:44:58 +02:00
bitfl0wer 73cc139e78 Moddify observe to still store T internally 2023-08-13 15:52:16 +02:00
fowb 29d4ef23a2 Change T: Updateable to Arc<RwLock<T>> 2023-08-12 22:40:40 +02:00
fowb a0c9f6fb14 Change observe() to take Arc<RwLock<T>> 2023-08-12 19:47:11 +02:00
bitfl0wer 9246fd9504 Add `GatewayHandle` to `UserMeta` 2023-07-22 14:38:55 +02:00
Flori ccf44a5375 Auto updating structs (#163)
* Gateway fields don't need to be pub

* Add store to Gateway

* Add UpdateMessage trait

* Proof of concept: impl UpdateMessage for Channel

* Start working on auto updating structs

* Send entity updates over watch channel

* Add id to UpdateMessage

* Create trait Updateable

* Add documentation

* add gateway test

* Complete test

* Impl UpdateMessage::update() for ChannelUpdate

* Impl UpdateMessage::update() for ChannelUpdate
Co-authored by: SpecificProtagonist <specificprotagonist@posteo.org>

* make channel::modify no longer mutate Channel

* change modify call

* remove unused imports

* Allow dead code with TODO to remove it

* fix channel::modify test

* Update src/gateway.rs

Co-authored-by: SpecificProtagonist <vincentjunge@posteo.net>

---------

Co-authored-by: SpecificProtagonist <vincentjunge@posteo.net>
2023-07-21 15:35:31 +02:00
kozabrada123 88d571486b Basic tests 2023-06-08 19:51:32 +02:00