You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#636 added [Rc|Stack]Block::with_encoding, but they're pretty cumbersome to use because you have to create a helper structure, and implement ManualBlockEncoding with the correct encoding.
What's the solution when something is cumbersome? Make it automatic!
An idea would be to write a script that uses libclang, goes through all Apple's headers, on a few different targets, and generates the correct ManualBlockEncoding for the corresponding fn(A) -> Rs. That way
This would allow the user to write RcBlock::with_encoding<fn(i32) -> i32, _, _>(|x| x * x) in the vast majority of cases.
#636 added
[Rc|Stack]Block::with_encoding
, but they're pretty cumbersome to use because you have to create a helper structure, and implementManualBlockEncoding
with the correct encoding.What's the solution when something is cumbersome? Make it automatic!
An idea would be to write a script that uses libclang, goes through all Apple's headers, on a few different targets, and generates the correct
ManualBlockEncoding
for the correspondingfn(A) -> R
s. That wayThis would allow the user to write
RcBlock::with_encoding<fn(i32) -> i32, _, _>(|x| x * x)
in the vast majority of cases.CC @PaulDance
The text was updated successfully, but these errors were encountered: