MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / render_memory

Function render_memory

atomic-canonical/src/render.rs:34–38  ·  view source on GitHub ↗

Project a canonical Memory node to a rendered string. Kept as a separate entry (rather than a `Target::Memory` variant) so each `render*` stays typed to the node it can actually hold — `render` cannot receive a Memory it has no fields for, and this cannot receive an Intent. Same pure-projection contract: no second authoring site, and the status line is regenerated from the spine.

(node: &MemoryNode, target: Target)

Source from the content-addressed store, hash-verified

32/// contract: no second authoring site, and the status line is regenerated from
33/// the spine.
34pub fn render_memory(node: &MemoryNode, target: Target) -> String {
35 match target {
36 Target::Cli => render_memory_cli(node),
37 }
38}
39
40fn render_cli(node: &CanonicalNode) -> String {
41 let mut s = String::new();

Calls 1

render_memory_cliFunction · 0.85