macro_rules! fact {
($predicate:expr, $($args:tt)*) => { ... };
}Expand description
Convenience macro to construct a Fact from
a predicate and a list of arguments.
Arguments can either take “literal” syntax, i.e. User{"123"}
or can be Rust literals, i.e. 123.
§Example
use oso_cloud::{fact, Fact, Value};
let fact: Fact = fact!("has_role", User { "1" }, "member", Repo { "1" });
assert_eq!(fact.args[0], Value::new("User", "1"));