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

Retrying with context for when and notify #55

Closed
wants to merge 4 commits into from
Closed

Retrying with context for when and notify #55

wants to merge 4 commits into from

Conversation

BlueGlassBlock
Copy link
Contributor

Another approach to #39, see #54

@BlueGlassBlock
Copy link
Contributor Author

BlueGlassBlock commented May 18, 2023

Currently the problem is that when requires fn(&E) -> bool while the field requires fn(&E, &C) -> bool which cannot be casted to.

The same applies to notify.

@Xuanwo
Copy link
Owner

Xuanwo commented May 18, 2023

Currently the problem is that when requires fn(&E) -> bool while the field requires fn(&E, &C) -> bool which cannot be casted to.

Can we set the when to |err, _| f(err)?

@BlueGlassBlock
Copy link
Contributor Author

Can we set the when to |err, _| f(err)?

Unfortunately, no, since it's a fn: cannot capture anything even using move

Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
Owner

Xuanwo commented May 18, 2023

I have some new ideas, but it's shortcome is that we need to implment call for differnt compose of C, RF and NF. Do you have better solutions?

Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
@Xuanwo
Copy link
Owner

Xuanwo commented May 18, 2023

I have some new ideas, but it's shortcome is that we need to implment call for differnt compose of C, RF and NF. Do you have better solutions?

Ok, I fixed it.

@BlueGlassBlock
Copy link
Contributor Author

Wow, type gymnastics saved the world again 😂

@Xuanwo
Copy link
Owner

Xuanwo commented May 19, 2023

Replaced by #54

@Xuanwo Xuanwo closed this May 19, 2023
@BlueGlassBlock BlueGlassBlock deleted the notify-context branch May 19, 2023 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants