pub trait ExternalLibrary: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn version(&self) -> &str;
fn is_available(&self) -> bool;
fn initialize(&mut self) -> ExternalResult<()>;
fn supported_operations(&self) -> Vec<String>;
// Provided method
fn supports_operation(&self, operation: &str) -> bool { ... }
}Expand description
Trait for external library adapters
Required Methods§
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the library is available on the system
Sourcefn initialize(&mut self) -> ExternalResult<()>
fn initialize(&mut self) -> ExternalResult<()>
Initialize the library (if needed)
Sourcefn supported_operations(&self) -> Vec<String>
fn supported_operations(&self) -> Vec<String>
Get supported operations
Provided Methods§
Sourcefn supports_operation(&self, operation: &str) -> bool
fn supports_operation(&self, operation: &str) -> bool
Check if a specific operation is supported
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".