use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[derive(Debug, Serialize, Deserialize)]
pub struct MultiPrefixTable {
#[serde(flatten)]
pub snippets: HashMap<String, MultiBody>,
}
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]
pub struct MultiBody {
pub prefix: Vec<String>,
pub body: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
impl MultiBody {
pub fn new(prefix: Vec<String>, body: Vec<String>, description: String) -> Self {
Self {
prefix,
body,
description: Some(description),
}
}
}