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

Remove the need for "as fn(_) -> _" for async function actors #412

Closed
Thomasdezeeuw opened this issue Mar 3, 2021 · 2 comments
Closed
Labels
enhancement An improvement of the API. priority:medium Medium priority issue.

Comments

@Thomasdezeeuw
Copy link
Owner

It's becoming a nuisance.

Maybe a IntoNewActor trait that is implemented for all FnMuts and get wrapped in a FnActor or something? Than spawning could accept a IntoNewActor, removing the need for as fn(_) -> _.

@Thomasdezeeuw Thomasdezeeuw added enhancement An improvement of the API. priority:medium Medium priority issue. labels Mar 3, 2021
@Thomasdezeeuw Thomasdezeeuw added this to the First release milestone Mar 3, 2021
@Thomasdezeeuw Thomasdezeeuw removed this from the First release milestone Mar 26, 2021
@Thomasdezeeuw
Copy link
Owner Author

The actor_fn/ActorFn added in #584 helps a lot, but something like the IntoNewActor trait might still be useful.

@Thomasdezeeuw
Copy link
Owner Author

Related rustc issue: rust-lang/rust#58078.

For now this can be resolved by using actor_fn/ActorFn, so closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of the API. priority:medium Medium priority issue.
Projects
None yet
Development

No branches or pull requests

1 participant