Skip to main content

is_reserved_function

Function is_reserved_function 

Source
pub fn is_reserved_function(name: &str) -> bool
Expand description

Whether no host function may be registered as name: a name in BUILTIN_FUNCTIONS, since a built-in cannot be shadowed, or validate, 3.x’s alias for validation, which the compat reader rewrites before any name is looked up. Registry::register panics on one; a host that registers names from data checks them here first.

use dataflow_rs::def::is_reserved_function;

assert!(is_reserved_function("map") && is_reserved_function("validate"));
assert!(!is_reserved_function("http_call"));