use serde::Serialize;
#[derive(Debug, Clone, Serialize)]
pub struct ArgumentMetadata {
pub name: &'static str,
pub arg_type: &'static str,
pub required: bool,
pub default: Option<&'static str>,
pub description: &'static str,
}
#[derive(Debug, Clone, Serialize)]
pub struct SyntaxVariants {
pub function: bool,
pub filter: bool,
pub is_test: bool,
}
impl SyntaxVariants {
pub const FUNCTION_ONLY: Self = Self {
function: true,
filter: false,
is_test: false,
};
pub const FUNCTION_AND_FILTER: Self = Self {
function: true,
filter: true,
is_test: false,
};
pub const FUNCTION_AND_TEST: Self = Self {
function: true,
filter: false,
is_test: true,
};
}
#[derive(Debug, Clone, Serialize)]
pub struct FunctionMetadata {
pub name: &'static str,
pub category: &'static str,
pub description: &'static str,
pub arguments: &'static [ArgumentMetadata],
pub return_type: &'static str,
pub examples: &'static [&'static str],
pub syntax: SyntaxVariants,
}