function
RenderDocument
RenderDocument renders a typed document without loading an editor or fetching referenced records. The block callback receives the generated payload codec; applications dispatch its Value union by concrete generated type. Missing callbacks fail explicitly. Use RenderHTML for deliberate raw recovery tooling.
Arguments
| Argument | Type | Description |
|---|---|---|
document | Document[T] | The document value. |
block | func(T) (string, | The block value. |
nodes | map[string]func(store.Values) (string, | The nodes value. |
Returns
The declared result.
(string, error)Full signature
func RenderDocument[T any](
document Document[T],
block func(T) (string, error),
nodes map[string]func(store.Values) (string, error),
) (string, error)