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

Allow non-'static lifetimes #63

Open
milibopp opened this issue May 13, 2015 · 2 comments
Open

Allow non-'static lifetimes #63

milibopp opened this issue May 13, 2015 · 2 comments

Comments

@milibopp
Copy link
Owner

This is currently a fairly significant limitation of this crate. Only types T: 'static are allowed for streams and signals. It should in principle be possible to lift this restriction but it might require some tweaks to the implementation. Also, not all parts of the API can work that way. For instance, one cannot feed a sink non-statics in a detached background thread. But the borrow checker should take care of such limitations.

@Moredread
Copy link
Contributor

What causes this?

@milibopp
Copy link
Owner Author

Lots of implementation details rely on that, merely because it was part of the generic bounds for all functions for a long time. I think it might be a viable strategy to relax the 'static bounds on some of methods step by step. Quite possibly a lot of the implementation will have to change to allow for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants