pub trait FunctionFamilyExtension: Send + Sync {
// Required methods
fn family_name(&self) -> &'static str;
fn get_properties(&self) -> HashMap<String, FunctionProperties>;
fn has_function(&self, name: &str) -> bool;
// Provided methods
fn version(&self) -> (u32, u32, u32) { ... }
fn dependencies(&self) -> Vec<&'static str> { ... }
}Expand description
Extension trait for adding new function families
This trait provides a stable interface for extending the function system with new mathematical function families while maintaining backward compatibility.
§Design Principles
- Backward Compatibility: New extensions never break existing code
- Type Safety: All extensions are statically checked at compile time
- Performance: Zero-cost abstractions with compile-time dispatch
- Modularity: Each extension is self-contained and independent
Required Methods§
Sourcefn family_name(&self) -> &'static str
fn family_name(&self) -> &'static str
Get the family name for this extension
Sourcefn get_properties(&self) -> HashMap<String, FunctionProperties>
fn get_properties(&self) -> HashMap<String, FunctionProperties>
Get all function properties provided by this extension
Sourcefn has_function(&self, name: &str) -> bool
fn has_function(&self, name: &str) -> bool
Check if this extension provides a specific function
Provided Methods§
Sourcefn dependencies(&self) -> Vec<&'static str>
fn dependencies(&self) -> Vec<&'static str>
Get dependencies on other function families