[−][src]Function gtmpl::funcs::or
pub fn or(args: &[Value]) -> Result<Value, String>
Returns the boolean OR of its arguments by returning the first non-empty argument or the last argument, that is, "or x y" behaves as "if x then x else y". All the arguments are evaluated.
Example
use gtmpl::template; let equal = template("{{ or 1 2.0 false . }}", "foo"); assert_eq!(&equal.unwrap(), "1");