Macro holmes::predicate [] [src]

macro_rules! predicate {
    ($holmes:ident, $pred_name:ident($($t:tt),*), $descr:expr) => { ... };
    ($holmes:ident, $pred_name:ident($($t:tt),*)) => { ... };
    ($pred_name:ident($($t:tt),*) : $descr:expr) => { ... };
    ($pred_name:ident($($t:tt),*)) => { ... };
}

Registers a predicate with the Holmes context.

predicate!(holmes, foo(string, uint64))

will register a predicate named foo, with a string slot and a uint64 slot, to the provided holmes context object.

If the holmes parameter is omitted, it will generate a function taking a holmes parameter in its stead.