Struct ketree::treebuilder::TreeBuilder
[−]
[src]
pub struct TreeBuilder<'a> { /* fields omitted */ }
Contains the code to be executed as a prologue, body, and epilogue.
Methods
impl<'a> TreeBuilder<'a>
[src]
fn new(body: &'a str, pr: &'a str, ep: &'a str) -> TreeBuilder<'a>
[src]
Creates a new TreeBuilder with provided 'body' code.
fn set_body(&mut self, s: &'a str)
[src]
Sets the body of code to be executed.
fn set_prologue(&mut self, s: &'a str)
[src]
Sets the prologue to be executed.
fn set_epilogue(&mut self, s: &'a str)
[src]
Sets the epilogue to be executed.
fn use_box_and_name<T, B>(
&self,
cml: Box<B>,
tree_name: &str
) -> Result<(Tree<T>, HashSet<String>), Error> where
T: 'static + Clone + Debug,
B: 'static + ModuleLoader,
[src]
&self,
cml: Box<B>,
tree_name: &str
) -> Result<(Tree<T>, HashSet<String>), Error> where
T: 'static + Clone + Debug,
B: 'static + ModuleLoader,
Consumes a Box containing a ketos::ModuleLoader and takes a name to look for that the tree is assigned to (using define in the body of Ketos code).
Returns a tuple containing the Tree and a HashSet of variable names.
fn use_box_set_and_name<T, B>(
&self,
cml: Box<B>,
var_set: HashSet<String>,
tree_name: &str
) -> Result<(Tree<T>, HashSet<String>), Error> where
T: 'static + Clone + Debug,
B: 'static + ModuleLoader,
[src]
&self,
cml: Box<B>,
var_set: HashSet<String>,
tree_name: &str
) -> Result<(Tree<T>, HashSet<String>), Error> where
T: 'static + Clone + Debug,
B: 'static + ModuleLoader,
Consumes a Box containing a ketos::ModuleLoader, consumes a HashSet
Returns a tuple containing the Tree and the consumed HashSet filled with variable names.