extendr_api::functions

Function find_namespaced_function

Source
pub fn find_namespaced_function(name: &str) -> Result<Language>
Expand description

Find a function or primitive that may be in a namespace.

use extendr_api::prelude::*;
test! {
   assert!(find_namespaced_function("+").is_ok());
   assert!(find_namespaced_function("ls").is_ok());
   assert!(find_namespaced_function("base::ls").is_ok());
   assert!(find_namespaced_function("ls")?.is_language());
   assert!(!find_namespaced_function("basex::ls").is_ok());
}