refactor(firmware): simplify configuration and diagnostics

This commit is contained in:
Onur Özkan committed 2026-08-23 00:40:36 +03:00
1 parent ba9c97ed3b
commit fdf82a5114
96 files changed
+1612 -2772

No files matched your search

+4 -1
View File
@@ -1,7 +1,7 @@
//! Transport-neutral typed configuration fields and descriptors.
use crate::{ConfigViolation, ValidationRule};
use kaptan_log::KaptanError;
use kaptan_err_propagate::KaptanError;
/// Maximum choices representable by one enum-backed field.
///
@@ -234,8 +234,10 @@ pub struct FieldDescriptor {
#[derive(Clone, Copy, Debug, PartialEq, KaptanError)]
pub enum FieldWriteError {
/// No descriptor exposes the requested identity.
#[kaptan_error(id = 1001)]
UnknownField(FieldId),
/// The supplied scalar type differs from the descriptor type.
#[kaptan_error(id = 1002)]
WrongType {
/// Requested field.
field: FieldId,
@@ -245,6 +247,7 @@ pub enum FieldWriteError {
actual: ValueKind,
},
/// A locally validated scalar violated a stable rule.
#[kaptan_error(id = 1003)]
Violation(ConfigViolation),
}