Skip to main content

NetworkConfigExt

Trait NetworkConfigExt 

Source
pub trait NetworkConfigExt {
    // Required methods
    fn spawn_native<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Network<LocalFileSystem>, OrchestratorError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn spawn_k8s<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Network<LocalFileSystem>, OrchestratorError>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn spawn_k8s_in_namespace<'life0, 'async_trait>(
        self,
        namespace: &'life0 str,
    ) -> Pin<Box<dyn Future<Output = Result<Network<LocalFileSystem>, OrchestratorError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn spawn_docker<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Network<LocalFileSystem>, OrchestratorError>> + Send + 'async_trait>>
       where Self: 'async_trait;
}

Required Methods§

Source

fn spawn_native<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Network<LocalFileSystem>, OrchestratorError>> + Send + 'async_trait>>
where Self: 'async_trait,

Spawns a network using the native or k8s provider.

§Example:
let network = NetworkConfig::load_from_toml("config.toml")?
    .spawn_native()
    .await?;
Source

fn spawn_k8s<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Network<LocalFileSystem>, OrchestratorError>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn spawn_k8s_in_namespace<'life0, 'async_trait>( self, namespace: &'life0 str, ) -> Pin<Box<dyn Future<Output = Result<Network<LocalFileSystem>, OrchestratorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Spawns a network using the k8s provider into namespace, which must already exist. It is left in place if spawning fails; Network::destroy deletes it.

Source

fn spawn_docker<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Network<LocalFileSystem>, OrchestratorError>> + Send + 'async_trait>>
where Self: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§