Trait ProviderConfig

Source
pub trait ProviderConfig:
    Send
    + Sync
    + Clone {
    // Required methods
    fn validate<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_env_vars(&self) -> HashMap<String, String>;
    fn get_working_directory(&self) -> Option<PathBuf>;
    fn is_available<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Common configuration trait for all providers

Required Methods§

Source

fn validate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validate the provider configuration

Source

fn get_env_vars(&self) -> HashMap<String, String>

Get environment variables needed for this provider

Source

fn get_working_directory(&self) -> Option<PathBuf>

Get working directory for this provider

Source

fn is_available<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check if provider is available on the system

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§