Skip to main content

UdpService

Trait UdpService 

Source
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§

Source

fn create_association( &self, listener: &str, client_tcp_peer: SocketAddr, identity: ClientIdentity, generation: u64, ) -> Pin<Box<dyn Future<Output = Result<UdpAssociationHandle, UdpError>> + Send + 'static>>

Source

fn is_enabled(&self) -> bool

Source

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".

Implementors§