core-foundation-rs icon indicating copy to clipboard operation
core-foundation-rs copied to clipboard

Missing CFMutableArray bindings and types

Open lqf96 opened this issue 7 years ago • 3 comments

Currently bindings for CFMutableArrayRef are missing and like CFArray we will also need to wrap it in a type called CFMutableArray.

lqf96 avatar May 03 '18 04:05 lqf96

Is there a specific use case you want this for?

jrmuizel avatar May 08 '18 14:05 jrmuizel

I would like to collect into a CFArray or CFMutableArray directly from an iterator instead of using a temporary Vec (https://github.com/sfackler/rust-security-framework/blob/master/security-framework/src/secure_transport.rs#L723). The problem is that CFArray does not implement FromIterator, and CFMutableArray does not exist. I think it will be easier to implement FromIterator for CFMutableArray.

lqf96 avatar Jun 07 '18 12:06 lqf96

I think I needed this once upon a time as well when I was writing something to avoid some temporaries.

waywardmonkeys avatar Jul 19 '18 15:07 waywardmonkeys