mod calculator;
mod datetime;
mod hash;
mod json_path;
mod regex;
mod uuid_tool;
pub use calculator::CalculatorTool;
pub use datetime::DateTimeTool;
pub use hash::HashTool;
pub use json_path::JsonPathTool;
pub use regex::RegexTool;
pub use uuid_tool::UuidTool;
use crate::tool::ToolRegistry;
use std::sync::Arc;
pub fn builtin_registry() -> ToolRegistry {
let mut registry = ToolRegistry::new();
registry.register(Arc::new(CalculatorTool::new()));
registry.register(Arc::new(DateTimeTool::new()));
registry.register(Arc::new(UuidTool::new()));
registry.register(Arc::new(HashTool::new()));
registry.register(Arc::new(RegexTool::new()));
registry.register(Arc::new(JsonPathTool::new()));
registry
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_builtin_registry() {
let registry = builtin_registry();
assert!(registry.contains("calculator"));
assert!(registry.contains("datetime"));
assert!(registry.contains("uuid"));
assert!(registry.contains("hash"));
assert!(registry.contains("regex"));
assert!(registry.contains("json_path"));
assert_eq!(registry.len(), 6);
}
}