Trait rhai::FnRegister
[−]
[src]
pub trait FnRegister<A, RetVal, Args> { fn register_fn(&mut self, name: &str, f: A); }
A trait used for registering functions to an Engine Currently, Rhai supports functions with up to 6 parameters
Required Methods
fn register_fn(&mut self, name: &str, f: A)
A method used for registering functions and methods to a Engine
Implementors
impl<'a, A, T, U, V, W, X, Y, Z> FnRegister<A, Z, (&'a mut T, U, V, W, X, Y)> for Engine where
A: 'static + Fn(&mut T, U, V, W, X, Y) -> Z,
T: Any,
U: Clone + Any,
V: Clone + Any,
W: Clone + Any,
X: Clone + Any,
Y: Clone + Any,
Z: Any,impl<'a, A, T, U, V, W, X, Y, Z> FnRegister<A, Z, (&'a T, U, V, W, X, Y)> for Engine where
A: 'static + Fn(T, U, V, W, X, Y) -> Z,
T: Clone + Any,
U: Clone + Any,
V: Clone + Any,
W: Clone + Any,
X: Clone + Any,
Y: Clone + Any,
Z: Any,impl<'a, A, T, U, V, W, X, Y> FnRegister<A, Y, (&'a mut T, U, V, W, X)> for Engine where
A: 'static + Fn(&mut T, U, V, W, X) -> Y,
T: Any,
U: Clone + Any,
V: Clone + Any,
W: Clone + Any,
X: Clone + Any,
Y: Any,impl<'a, A, T, U, V, W, X, Y> FnRegister<A, Y, (&'a T, U, V, W, X)> for Engine where
A: 'static + Fn(T, U, V, W, X) -> Y,
T: Clone + Any,
U: Clone + Any,
V: Clone + Any,
W: Clone + Any,
X: Clone + Any,
Y: Any,impl<'a, A, T, U, V, W, X> FnRegister<A, X, (&'a mut T, U, V, W)> for Engine where
A: 'static + Fn(&mut T, U, V, W) -> X,
T: Any,
U: Clone + Any,
V: Clone + Any,
W: Clone + Any,
X: Any,impl<'a, A, T, U, V, W, X> FnRegister<A, X, (&'a T, U, V, W)> for Engine where
A: 'static + Fn(T, U, V, W) -> X,
T: Clone + Any,
U: Clone + Any,
V: Clone + Any,
W: Clone + Any,
X: Any,impl<'a, A, T, U, V, W> FnRegister<A, W, (&'a mut T, U, V)> for Engine where
A: 'static + Fn(&mut T, U, V) -> W,
T: Any,
U: Clone + Any,
V: Clone + Any,
W: Any,impl<'a, A, T, U, V, W> FnRegister<A, W, (&'a T, U, V)> for Engine where
A: 'static + Fn(T, U, V) -> W,
T: Clone + Any,
U: Clone + Any,
V: Clone + Any,
W: Any,impl<'a, A, T, U, V> FnRegister<A, V, (&'a mut T, U)> for Engine where
A: 'static + Fn(&mut T, U) -> V,
T: Any,
U: Clone + Any,
V: Any,impl<'a, A, T, U, V> FnRegister<A, V, (&'a T, U)> for Engine where
A: 'static + Fn(T, U) -> V,
T: Clone + Any,
U: Clone + Any,
V: Any,impl<'a, A, T, U> FnRegister<A, U, &'a mut T> for Engine where
A: 'static + Fn(&mut T) -> U,
T: Any,
U: Any,impl<'a, A, T, U> FnRegister<A, U, &'a T> for Engine where
A: 'static + Fn(T) -> U,
T: Clone + Any,
U: Any,impl<A, T> FnRegister<A, T, ()> for Engine where
A: 'static + Fn() -> T,
T: Any,