| Crates.io | premortem-derive |
| lib.rs | premortem-derive |
| version | 0.3.0 |
| created_at | 2025-11-25 23:39:48.356279+00 |
| updated_at | 2025-11-26 05:27:42.09729+00 |
| description | Derive macros for the premortem configuration validation library |
| homepage | |
| repository | https://github.com/iepathos/premortem |
| max_upload_size | |
| id | 1950639 |
| size | 53,076 |
Derive macros for the premortem configuration validation library.
This crate is typically used through the main premortem crate with the derive feature (enabled by default):
[dependencies]
premortem = "0.1"
use premortem::Validate;
use serde::Deserialize;
#[derive(Debug, Deserialize, Validate)]
struct AppConfig {
#[validate(non_empty)]
pub host: String,
#[validate(range(1..=65535))]
pub port: u16,
}
If you need to depend on this crate directly:
[dependencies]
premortem-derive = "0.1"
See the premortem documentation for full usage details and available validators.
MIT