Struct ckb_resource::TemplateContext [−][src]
pub struct TemplateContext<'a> { /* fields omitted */ }Expand description
The context used to expand the Template.
Implementations
Creates a new template.
spec- the chain spec name for template spec branch.kvs- the initial template variables.
Examples
use ckb_resource::TemplateContext;
// Creates a context for *dev* chain and initializes variables:
//
// rpc_port => 8114
// p2p_port => 8115
TemplateContext::new("dev", vec![("rpc_port", "8114"), ("p2p_port", "8115")]);