Add "toll-free bridging" between Objective-C and CoreFoundation types #693
Labels
A-framework
Affects the framework crates and the translator for them
enhancement
New feature or request
Certain CF types are toll-free bridged to Objective-C types.
We should support that, it'll probably be enough to just add
AsRef
implementations, as we have a blankedimpl<T: AsRef<U>> From<&T> for Retained<U>
.This won't be perfectly efficient, it will incur an extra retain/release, but a direct conversion like
From<CFRetained<CFString>> for Retained<NSString>
probably won't be doable due to the orphan rule.I guess we could add something like
CFRetained::into_objc
/CFRetained::from_objc
too?The text was updated successfully, but these errors were encountered: