Merge pull request #43 from luciusmagn/master
fix version in README, continue documenting
This commit is contained in:
commit
896c2f7a08
@ -12,7 +12,7 @@ Rhai's current feature set:
|
|||||||
* No additional dependencies
|
* No additional dependencies
|
||||||
* No unsafe code
|
* No unsafe code
|
||||||
|
|
||||||
**Note:** Currently, it's version 0.5.1, so the language and APIs may change before they stabilize.*
|
**Note:** Currently, it's version 0.6.2, so the language and APIs may change before they stabilize.*
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ You can install Rhai using crates by adding this line to your dependences:
|
|||||||
|
|
||||||
```
|
```
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rhai = "0.5.1"
|
rhai = "0.6.2"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Related
|
## Related
|
||||||
|
@ -106,6 +106,7 @@ pub enum FnType {
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub struct Engine {
|
pub struct Engine {
|
||||||
|
/// A hashmap containing all functions know to the engine
|
||||||
pub fns: HashMap<String, Vec<FnType>>,
|
pub fns: HashMap<String, Vec<FnType>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,10 @@ use std::boxed::Box;
|
|||||||
|
|
||||||
use engine::{EvalAltResult, Engine, FnType};
|
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> {
|
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);
|
fn register_fn(&mut self, name: &str, f: A);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user