pub trait UdpService: Send + Sync {
// Required methods
fn create_association(
&self,
listener: &str,
client_tcp_peer: SocketAddr,
identity: ClientIdentity,
generation: u64,
) -> Pin<Box<dyn Future<Output = Result<UdpAssociationHandle, UdpError>> + Send + 'static>>;
fn is_enabled(&self) -> bool;
fn active_count(
&self,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'static>>;
}Expand description
Trait for UDP association services. Implemented by the runtime crate.
Required Methods§
fn create_association( &self, listener: &str, client_tcp_peer: SocketAddr, identity: ClientIdentity, generation: u64, ) -> Pin<Box<dyn Future<Output = Result<UdpAssociationHandle, UdpError>> + Send + 'static>>
fn is_enabled(&self) -> bool
fn active_count(&self) -> Pin<Box<dyn Future<Output = usize> + Send + 'static>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".