Source code for my personal quote bot project.

actor: refactor to remove kameo usage; enables dynamic dispatch. master

Kameo's definition of its `Actor` and `Message` traits prevented me from creating trait objects for my actors, as I did not own the trait definitions and could not use `async_trait` on them. For my use case in this project, most of Kameo's functionality was superfluous and went unused; in the future, introducing an abstraction over the usage of channels for message passing and sharing of actors may be worth considering, though there is no necessity as of yet. Leveraging dynamic dispatch for quote "sinks" has the following benefits: - The logic to submit quotes to any number of sinks has been greatly simplified. - New sink implementations may be supplied transparently even by 3rd-party crates. - Multiple instances of the same sink implementation may be used at once. The previous implementation did not support this feature, as it would have required even more complex logic spanning the whole lifetime of the program.


Author crashkeys.dev Date Commit 1e330210 Parent d1cd9999 Change ID uxkkxyyo