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;
}Expand description
RelayAddressGenerator is used to generate a Relay Address when creating an allocation.
You can use one of the provided ones or provide your own.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".