Macro holmes::func
[−]
[src]
macro_rules! func { ($holmes:ident, let $name:ident : $src:tt -> $dst:tt = $body:expr) => { ... }; (let $name:ident : $src:tt -> $dst:tt = $body:expr) => { ... }; }
Registers a native rust function with the Holmes
object for use in rules.
func!(holmes, let f : uint64 -> string = |x : &u64| {
format!("{}", x)
})
If your function input has more than one parameter, they will be tupled and packed into a value. To describe such a function, just use a tuple type on the left of the arrow.