Support a user-defined private state for continuous service requests
@mxgrey is already working on this.
Since Sep 25, 2024.
- Dominant language
- Rust
- Stars
- 72
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Continuous services may fulfill requests over the course of multiple schedule cycles. To implement the service, users might want to store a state data structure that persists across the cycles. Each state instance should be associated with exactly one ongoing request.
We should add a fourth generic parameter called State to ContinuousServiceKey and ContinuousQuery. It would have a default argument of (), which should preserve backwards compatibility for the API.
To begin we will require the State to implement Default so we can default-initialize the value upon a new request coming in. We could consider requiring it to implement FromWorld instead, or come up with our own trait similar to FromWorld that also provides information about the source and provider entity as well as the initial request data, all alongside a &mut World.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.