Skip to content
Shaye Garg edited this page Sep 29, 2021 · 1 revision

A use expression evaluates a template with arguments passed:

use <template: path> {
    <ident>: <expr>,
    ...
}
/// Which becomes:
use MyTemplate {
    node: "ThisIsANode"
}

template: The path of the template to evaluate.

Inside the braces, the values of each template argument are given, much like constructing a struct.

If values are not given, default values will be used if they exist. If they don't, say hello to an error.

Clone this wiki locally