| Crates.io | nskeyedunarchiver_derive |
| lib.rs | nskeyedunarchiver_derive |
| version | 0.1.0 |
| created_at | 2025-05-28 15:24:40.202505+00 |
| updated_at | 2025-05-28 15:24:40.202505+00 |
| description | A helper derive macro for nskeyedunarchiver crate |
| homepage | |
| repository | https://github.com/michaelwright235/nskeyedunarchiver |
| max_upload_size | |
| id | 1692946 |
| size | 33,234 |
Derive macro which generates an impl of the trait Decodable.
The easiest way to make a type Decodable is to derive the Decodable macro for your struct or enum. Types of fields and variants should also implement Decodable trait.
The macro attribute is #[decodable(...)]. Every inner attribute is separated with a comma ,.
#[decodable(rename = "...")]: decodes a container with the given name instead of its Rust name.#[decodable(rename = "...")]: decodes a field or variant with the given name instead of its Rust name.#[decodable(skip)]: do not decode a field or variant. Doesn't work with other attributes.#[decodable(default)]: if the value is not present when decoding, use the Default::default().#[decodable(unhandled)]: creates a hashmap of any values that are unhandled and thus hasn't been decoded. A field should have a type of HashMap<String, ObjectValue>.