Skip to main content

NetworkIsolator

Trait NetworkIsolator 

Source
pub trait NetworkIsolator: Send + Sync {
    // Required methods
    fn setup<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn spawn_proxy<'life0, 'life1, 'async_trait>(
        &'life0 self,
        target_ip: &'life1 str,
        target_port: u16,
    ) -> Pin<Box<dyn Future<Output = Result<(ProxyListener, JoinHandle<()>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn teardown<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

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

Source

fn spawn_proxy<'life0, 'life1, 'async_trait>( &'life0 self, target_ip: &'life1 str, target_port: u16, ) -> Pin<Box<dyn Future<Output = Result<(ProxyListener, JoinHandle<()>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§