feat(config): add validated profile core

This commit is contained in:
Onur Özkan committed 2026-08-09 22:06:10 +03:00
1 parent 0a75860841
commit 6c5e061359
36 files changed
+3343

No files matched your search

@@ -0,0 +1,20 @@
use kaptan_config::{ConfigValidate, ConfigViolation, ValidateFields};
#[derive(Clone, Copy, ConfigValidate)]
pub(super) struct SafetyCandidate {
#[config(
id = 1,
key = "safety.prearm_dwell_us",
unit = "us",
default = 100_000,
nonzero,
range(min = 1, max = 10_000_000)
)]
pub(super) prearm_dwell_microseconds: u64,
}
impl SafetyCandidate {
pub(super) fn validate(self) -> Result<(), ConfigViolation> {
self.validate_fields()
}
}