Skip to main content

render

Function render 

Source
pub fn render(value: &str, name: &str, instance: u32) -> String
Expand description

Substitutes the tokens in value.

Call validate first: an unknown token here renders as nothing, because normalize is the seam that refuses one and a value reaching this function has already passed it. An unclosed {{ is the other case validate exists to catch before this function ever sees the value: on one, walk stops with an error partway through, so this renders truncated at that point rather than including the rest of value.