Skip to main content

render_as_content

Function render_as_content 

Source
pub fn render_as_content(value: &ValueWord) -> ContentNode
Expand description

Render a ValueWord value as a ContentNode using Content dispatch.

Dispatch order:

  1. If value IS a ContentNode → return as-is
  2. If a user-defined Content impl exists → call user’s render()
  3. If value type has a built-in Content impl → produce structured output
  4. Else → Display fallback → ContentNode::plain(display_string)