Trait Runtime

Source
pub trait Runtime {
    type Timer: Future<Output = ()>;
    type UdpSocket: UdpSocket;

    // Required methods
    fn bind_udp(
        &self,
        listen_addr: SocketAddr,
    ) -> Result<Self::UdpSocket, Error>;
    fn timer(&self, after: Duration) -> Self::Timer;
}

Required Associated Types§

Required Methods§

Source

fn bind_udp(&self, listen_addr: SocketAddr) -> Result<Self::UdpSocket, Error>

Source

fn timer(&self, after: Duration) -> Self::Timer

Implementors§