use std::error::Error;
use derive_builder::Builder;
use serde::Serialize;
#[derive(Debug)]
pub enum Severity {
ADVICE,
ERROR,
WARNING,
}
#[derive(Builder, Default, Debug, Clone, Serialize)]
#[builder(default, try_setter, setter(into))]
pub struct ProblemGroup {
pub name: &'static str,
pub display_name: &'static str,
pub parent: Option<Box<ProblemGroup>>,
}
impl Default for &ProblemGroup {
fn default() -> Self {
&ProblemGroup { name: "", display_name: "", parent: None }
}
}
#[derive(Builder, Debug, Default, Clone, Serialize)]
#[builder(default, setter(into))]
pub struct ProblemSpec<'a> {
id: &'a ProblemGroup,
details: &'static str,
solution: String,
file_location: String,
contextual_label: String,
}