Print documentation for all functions of a given type to stdout Usage: `cargo run --bin print_functions_docs -- ` Called from `dev/update_function_docs.sh`
()
| 32 | /// |
| 33 | /// Called from `dev/update_function_docs.sh` |
| 34 | fn main() -> Result<()> { |
| 35 | let args: Vec<String> = args().collect(); |
| 36 | |
| 37 | if args.len() != 2 { |
| 38 | panic!( |
| 39 | "Usage: {} type (one of 'aggregate', 'scalar', 'window')", |
| 40 | args[0] |
| 41 | ); |
| 42 | } |
| 43 | |
| 44 | let function_type = args[1].trim().to_lowercase(); |
| 45 | let docs = match function_type.as_str() { |
| 46 | "aggregate" => print_aggregate_docs(), |
| 47 | "scalar" => print_scalar_docs(), |
| 48 | "window" => print_window_docs(), |
| 49 | _ => { |
| 50 | panic!("Unknown function type: {function_type}") |
| 51 | } |
| 52 | }?; |
| 53 | |
| 54 | println!("{docs}"); |
| 55 | Ok(()) |
| 56 | } |
| 57 | |
| 58 | fn print_aggregate_docs() -> Result<String> { |
| 59 | let mut providers: Vec<Box<dyn DocProvider>> = vec![]; |
nothing calls this directly
no test coverage detected
searching dependent graphs…