schemaui 0.12.3

A Rust library for generating TUI and Web UIs from JSON Schemas for configuration management.
Documentation
#[derive(Debug, Clone)]
pub struct FieldCoercionError {
    pub pointer: String,
    pub message: String,
}

impl std::fmt::Display for FieldCoercionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}: {}", self.pointer, self.message)
    }
}

impl std::error::Error for FieldCoercionError {}

impl FieldCoercionError {
    pub fn unsupported(pointer: &str, action: &str) -> Self {
        Self {
            pointer: pointer.to_string(),
            message: format!("field does not support {action}"),
        }
    }
}