ryzz
ryzz copied to clipboard
support min and max values for numeric types
It would be sweet to pre-specify ranges of values that can be used to validate the struct prior to entry.
For example this would be 🔥
#[table("shiny_apps")]
struct ShinyAppRow {
#[ryzz(pk)]
id: String,
name: String,
slug: Option<String>,
#[ryzz(default = 0, min = 0)]
min_instances: i64,
#[ryzz(default = 0, min = 1)]
max_instances: i64,
#[ryzz(default = 0, min = 0)]
spawn_threshold: i64,
#[ryzz(default = 240)]
inactive_timeout: i64,
#[ryzz(default = 60, min = 30, max = 180)]
connection_timeout: i64,
}