Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ResourceIndex::update_one() for More Detailed Events #89

Open
tareknaser opened this issue Sep 16, 2024 · 1 comment
Open

Improve ResourceIndex::update_one() for More Detailed Events #89

tareknaser opened this issue Sep 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@tareknaser
Copy link
Collaborator

Currently, ResourceIndex::update_one() returns a Result<IndexUpdate<Id>>, which basically just includes a couple of hashsets for added and removed resources. This is simple so that it matches the return type of update_all().

However, we should consider enhancing update_one to provide more detailed events. This could make the Track API and Watch API more powerful compared to the Reactive API. The goal is to support finer-grained events, similar to what notify-rs offers, including not just add/remove events but also rename and modify events.

For more context, see #36 (comment)

@kirillt
Copy link
Member

kirillt commented Sep 16, 2024

Also, we can consider returning enum from update_one (instead of struct), since only one path can be updated. But this is only possible if we have dedicated enum variants for modifications and renamings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants