MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / render_array

Function render_array

src/mcp/tools/render.rs:526–547  ·  view source on GitHub ↗
(md: &mut Md, arr: &[Value], depth: u8)

Source from the content-addressed store, hash-verified

524}
525
526fn render_array(md: &mut Md, arr: &[Value], depth: u8) {
527 if arr.is_empty() {
528 md.empty_note("None.");
529 return;
530 }
531 if let Some(paths) = compact_path_array(arr) {
532 md.line(&paths);
533 return;
534 }
535 if arr.iter().all(Value::is_object) {
536 render_object_array_table(md, arr);
537 } else {
538 for e in arr {
539 if is_scalar(e) {
540 md.bullet(&scalar_str(e));
541 } else {
542 md.bullet("");
543 render_value(md, e, depth + 1);
544 }
545 }
546 }
547}
548
549/// Preferred left-to-right ordering for well-known columns; everything else
550/// sorts alphabetically after these.

Callers 1

render_valueFunction · 0.85

Calls 9

compact_path_arrayFunction · 0.85
is_scalarFunction · 0.85
scalar_strFunction · 0.85
render_valueFunction · 0.85
empty_noteMethod · 0.80
lineMethod · 0.80
bulletMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected