| Crates.io | smart-serde-default |
| lib.rs | smart-serde-default |
| version | 0.1.1 |
| created_at | 2024-06-21 22:17:22.937637+00 |
| updated_at | 2024-06-21 22:20:24.580242+00 |
| description | An annotation to implement #[serde(default)] and Default. |
| homepage | |
| repository | https://github.com/enzious/smart-serde-default |
| max_upload_size | |
| id | 1280006 |
| size | 6,840 |
A crate that basically extends the serde-inline-default and smart-default crates functionality to allow you to specify a default for both std::default::Default and serde with one annotation.
#[smart_serde_default]
#[derive(Debug, Deserialize, Serialize, SmartDefault)]
pub struct FuzionRedisConfigBuilder {
#[smart_default(String::from("127.0.0.1"))]
host: String,
#[smart_default(6379)]
port: u16,
}