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

Make Selector fully private #250

Closed
carllerche opened this issue Aug 25, 2015 · 6 comments
Closed

Make Selector fully private #250

carllerche opened this issue Aug 25, 2015 · 6 comments
Labels
Milestone

Comments

@carllerche
Copy link
Member

Currently, Selector is only public in order to support the Evented trait which exposes the type as part of it's API. It should be possible to fix this.

@carllerche carllerche added the api label Nov 23, 2015
@carllerche carllerche added this to the v0.5.0 milestone Nov 23, 2015
@carllerche carllerche modified the milestones: v1.0, v0.5.0 Dec 1, 2015
@reem
Copy link
Contributor

reem commented Dec 4, 2015

Just to make sure - do you plan to have outside types able to implement Evented? I've implemented Evented for a few types in other crates, but I could also work around it if it became impossible. (though I'd rather not :P)

@carllerche
Copy link
Member Author

It should be plausible to make it private and let you implement Evented as long as you can proxy the call to some other Evented type that you own.

@reem
Copy link
Contributor

reem commented Dec 4, 2015

The implementation (all methods) can be private, but the type itself has to be exposed if it's part of the method signatures on Evented.

@nixpulvis
Copy link

Related see #319.

@carllerche
Copy link
Member Author

The strategy here will be to have Evented take an EventLoop reference vs. a Selector reference. Internal to Mio implementations of Evented will be able to access the selector via EventLoop, implementations external to Mio can proxy to other Evented types.

@carllerche
Copy link
Member Author

Fixed on master

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

No branches or pull requests

3 participants