-
-
Notifications
You must be signed in to change notification settings - Fork 76
Upcasting T: Message to AnyObject #844
Copy link
Copy link
Open
Labels
A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesAffects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesenhancementNew feature or requestNew feature or request
Description
Metadata
Metadata
Assignees
Labels
A-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesAffects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesenhancementNew feature or requestNew feature or request
If all you know about a type is that it is
T: Message(orT: ClassType), then you can't safely getAnyObjectfrom that. Probably a rare case, usually you're working with a concrete type, and then you'll simply be able to.as_ref()or deref to it, but would be nice to have.Maybe it would make sense to add a
fn as_any(&self) -> &AnyObject where Self: 'statictoMessage?