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 EncodePtr trait #13

Closed
SSheldon opened this issue Feb 18, 2015 · 2 comments
Closed

Remove the EncodePtr trait #13

SSheldon opened this issue Feb 18, 2015 · 2 comments

Comments

@SSheldon
Copy link
Owner

The EncodePtr trait may not be necessary. Currently, its main purpose is to express that reference/pointers to any NSObject may be encoded. This can partially be described using where clauses, like where *mut Self: Encode.

Unfortunately, this doesn't allow expressing where &'a Self: Encode because the lifetime is unconstrained, but working around this by casting to a pointer might not be so bad.

The main issue with this is rust-lang/rust#20671; even if a where clause is added to the INSObject trait, it doesn't propagate to subclasses.

@SSheldon
Copy link
Owner Author

SSheldon commented Mar 9, 2015

This trait was removed in c50b646 after verifying messages was removed. Message verification can't be added back until the issue in rust is resolved.

@SSheldon SSheldon closed this as completed Mar 9, 2015
@SSheldon
Copy link
Owner Author

Encode for references can be expressed with where for<'a> &'a Self: Encode

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

No branches or pull requests

1 participant