premortem-derive 0.2.0

Derive macros for the premortem configuration validation library
Documentation

premortem-derive

CI Coverage Security Crates.io Documentation License

Derive macros for the premortem configuration validation library.

Usage

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,
}

Direct Dependency

If you need to depend on this crate directly:

[dependencies]
premortem-derive = "0.1"

Documentation

See the premortem documentation for full usage details and available validators.

License

MIT