bors-servo 36fad2dbda Auto merge of #128 - faern:impl-from-cfstring, r=nox
Implement From<&str> for CFString

I'm not sure if you have any strict policies on what types you usually accept as parameters to the safe wrappers. So I'm not sure if you want this or not. But my reasons are:

I create `system-configuration` and `system-configuration-sys` crates as bindings to that API. In the [`SCDynamicStore`] module a lot of the functions take a `CFStringRef` as argument. It would be more ergonomic if this safe wrapper type could deal with Rust strings directly, so I can do:
```rust
let store = SCDynamicStore::create("my-dynamic-store");
let dict = store.find("State:/Network/Global/IPv4");
```
But at the same time I don't want to make it harder to use for people who already sit on `CFString` objects. So with this new `From<&str>` impl my API can be used both with `&str` and `CFString` if I implement the methods as `<S: Into<CFString>>`.

[`SCDynamicStore`]: https://developer.apple.com/documentation/systemconfiguration/scdynamicstore?language=objc

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/core-foundation-rs/128)
<!-- Reviewable:end -->
2017-11-22 08:24:29 -06:00
2015-11-03 18:21:36 -07:00
2013-04-04 19:01:35 -07:00
2013-04-03 18:18:52 -07:00
2013-04-03 18:18:52 -07:00
2017-08-08 14:31:38 +01:00

core-foundation-rs

Build Status

Compatibility

By default it targets macOS 10.7.

To enable features added in macOS 10.8, set Cargo feature mac_os_10_8_features. To have both 10.8 features and 10.7 compatibility, also set mac_os_10_7_support. Setting both requires weak linkage, which is is a nighty-only feature as of Rust 1.19.

S
Description
No description provided
Readme 2.5 MiB
Languages
Rust 100%