docs.rs failed to build prefs-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
prefs
Type-safe macOS preferences library with a typed key API and optional derive macro.
Features
- Typed keys —
Key<T>guarantees compile-time type safety - Collections — support for
Vec<String>(CFArray) - Derive macro — declarative struct-based preferences with
#[derive(Preferences)] - Zero-cost —
Key<T>is a ZST wrapper around&'static str
Installation
[]
= { = "0.1", = ["derive"] }
Usage
Typed key API
use ;
const VOLUME: = new;
const LAUNCHES: = new;
const DARK_MODE: = new;
Derive API
use Preferences;
Supported types
| Rust type | CFPreferences type |
|---|---|
bool |
CFBoolean |
i64 |
CFNumber (int64) |
f64 |
CFNumber (double) |
String |
CFString |
Vec<String> |
CFArray of CFStrings |
License
MIT