aimx/info_library/function_card.rs
1/// Complete documentation for a single AIMX function.
2#[derive(Debug, Clone)]
3pub struct FunctionCard {
4 /// Function identifier/name (e.g., "concat", "abs")
5 pub identifier: &'static str,
6
7 /// User-displayable function signature (e.g., "concat(array)")
8 pub signature: &'static str,
9
10 /// Single sentence description for quick reference
11 pub brief: &'static str,
12
13 /// Detailed 3-5 sentence usage guide with context
14 pub description: &'static str,
15
16 /// Parameter documentation in order
17 pub arguments: &'static [&'static ArgumentInfo],
18
19 /// Return value description and type
20 pub returns: &'static str,
21
22 /// Error conditions and handling guidance
23 pub errors: &'static str,
24
25 /// Category membership (can belong to multiple)
26 pub categories: &'static [&'static str],
27
28 /// Practical usage examples
29 pub examples: &'static [&'static str],
30}
31
32/// Documentation for a single function parameter.
33#[derive(Debug, Clone)]
34pub struct ArgumentInfo {
35 /// Parameter name for signature display (e.g., "array", "text")
36 pub label: &'static str,
37
38 /// Parameter purpose and expected format
39 pub description: &'static str,
40
41 /// Type hint for users (e.g., "Array<Arc<str>>", "f64")
42 pub type_hint: &'static str,
43
44 /// Whether parameter is optional (default false)
45 pub optional: bool,
46}