Skip to main content

UserContentForResolver

Type Alias UserContentForResolver 

Source
pub type UserContentForResolver = dyn Fn(&ValueWord, &str, &RendererCapabilities) -> Option<ContentNode> + Send + Sync;
Expand description

Render a ValueWord value as a ContentNode with adapter-specific dispatch.

Dispatch order:

  1. ContentFor → adapter-specific rendering (future: user-defined impls)
  2. Content → generic content rendering via render_as_content
  3. Display fallback → plain text

The caps parameter provides renderer capabilities so the Content impl can adapt output (e.g., use ANSI codes only when caps.ansi is true). Optional adapter-specific Content resolver.