Skip to main content

ExternalLibrary

Trait ExternalLibrary 

Source
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§

Source

fn name(&self) -> &str

Get the library name

Source

fn version(&self) -> &str

Get the library version

Source

fn is_available(&self) -> bool

Check if the library is available on the system

Source

fn initialize(&mut self) -> ExternalResult<()>

Initialize the library (if needed)

Source

fn supported_operations(&self) -> Vec<String>

Get supported operations

Provided Methods§

Source

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".

Implementors§