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

Unify Handle/HandleRef behind a single trait. #493

Open
todo bot opened this issue Sep 25, 2019 · 0 comments
Open

Unify Handle/HandleRef behind a single trait. #493

todo bot opened this issue Sep 25, 2019 · 0 comments
Assignees
Labels
project-libuser Related to the libuser todo 🗒️ Created by the todo bot type-refactoring Cleanup and refactoring tasks

Comments

@todo
Copy link

todo bot commented Sep 25, 2019

The fact I have to do this makes me think there's really a problem in the handle/handleref design. Maybe there should be a trait unifying Handle/HandleRef, and `Process` and co should be generic on those? That would allow me to call the functions on "borrowed lifetime-erased" handles.
This trait could probably be AsRef or Borrow. Ideally the generic types would be an internal implementation details and we'd just expose "Process" and "ProcessBorrowed" types through typedef/newtypes. Needs a lot of thought.


// TODO: Unify Handle/HandleRef behind a single trait.
// BODY: The fact I have to do this makes me think there's really a
// BODY: problem in the handle/handleref design. Maybe there should be a
// BODY: trait unifying Handle/HandleRef, and `Process` and co should be
// BODY: generic on those? That would allow me to call the functions on
// BODY: "borrowed lifetime-erased" handles.
// BODY:
// BODY: This trait could probably be AsRef or Borrow. Ideally the
// BODY: generic types would be an internal implementation details
// BODY: and we'd just expose "Process" and "ProcessBorrowed" types
// BODY: through typedef/newtypes. Needs a lot of thought.


This issue was generated by todo based on a TODO comment in 7651488 when #488 was merged. cc @roblabla.
@todo todo bot added the todo 🗒️ Created by the todo bot label Sep 25, 2019
@todo todo bot assigned roblabla Sep 25, 2019
@roblabla roblabla added project-libuser Related to the libuser type-refactoring Cleanup and refactoring tasks labels Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project-libuser Related to the libuser todo 🗒️ Created by the todo bot type-refactoring Cleanup and refactoring tasks
Projects
None yet
Development

No branches or pull requests

1 participant