We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The builtins (src/functions/builtins/*) are all still using the older syntax, eg:
const LIST: FunctionDefinition = FunctionDefinition { name: "api_list", category: Some("network"), description: "List all registered APIs", arguments: Vec::new, handler: |_function, _token, state, _args| { let mut keys = state.apis.keys().collect::<Vec<&String>>(); keys.sort(); let definitions = keys .iter() .map(|k| format!("{}: {}", k, state.apis.get(*k).unwrap())); let t = definitions.collect::<Vec<String>>().join("\n"); Ok(Value::String(t)) }, };
Instead of the macro:
define_function!( name = sha256, category = "cryptography", description = "Returns the SHA256 hash of a given string", arguments = [function_arg!("plural", "input":Any)], handler = |function, token, state, args| { use sha2::{Digest, Sha256}; let input = args.get("input").required().as_string(); let mut hasher = Sha256::new(); hasher.update(input); let s = format!("{:X}", hasher.finalize()); Ok(Value::String(s)) } );
Examples have been moved over but these still need to be redone in the new syntax
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The builtins (src/functions/builtins/*) are all still using the older syntax, eg:
Instead of the macro:
Examples have been moved over but these still need to be redone in the new syntax
The text was updated successfully, but these errors were encountered: