Skip to content

Remove the EncodePtr trait #13

Closed
Closed
@SSheldon

Description

@SSheldon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions