Merge pull request #43 from luciusmagn/master

fix version in README, continue documenting
This commit is contained in:
Lukáš Hozda [magnusi]
2017-10-31 13:43:46 +01:00
committed by GitHub
3 changed files with 6 additions and 2 deletions

View File

@@ -106,6 +106,7 @@ pub enum FnType {
/// }
/// ```
pub struct Engine {
/// A hashmap containing all functions know to the engine
pub fns: HashMap<String, Vec<FnType>>,
}

View File

@@ -3,7 +3,10 @@ use std::boxed::Box;
use engine::{EvalAltResult, Engine, FnType};
/// A trait used for registering functions to an Engine
/// Currently, Rhai supports functions with up to 6 parameters
pub trait FnRegister<A, RetVal, Args> {
/// A method used for registering functions and methods to a Engine
fn register_fn(&mut self, name: &str, f: A);
}