RelayAddressGenerator

Trait RelayAddressGenerator 

Source
pub trait RelayAddressGenerator {
    // Required methods
    fn validate(&self) -> Result<(), Error>;
    fn allocate_conn<'life0, 'async_trait>(
        &'life0 self,
        use_ipv4: bool,
        requested_port: u16,
    ) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn Conn + Send + Sync>, SocketAddr), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn validate(&self) -> Result<(), Error>

Source

fn allocate_conn<'life0, 'async_trait>( &'life0 self, use_ipv4: bool, requested_port: u16, ) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn Conn + Send + Sync>, SocketAddr), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§