use serde::Serialize;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum SpecAdmonitionKind {
Note,
Warning,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct SpecAdmonition {
pub kind: SpecAdmonitionKind,
pub text: String,
}
impl SpecAdmonition {
pub fn note(text: impl Into<String>) -> Self {
Self {
kind: SpecAdmonitionKind::Note,
text: text.into(),
}
}
pub fn warning(text: impl Into<String>) -> Self {
Self {
kind: SpecAdmonitionKind::Warning,
text: text.into(),
}
}
}