Open
Description
#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) -> R
s. That way
This would allow the user to write RcBlock::with_encoding<fn(i32) -> i32, _, _>(|x| x * x)
in the vast majority of cases.
CC @PaulDance