/// Registers a `PacketReceiver` with the executor and returns a registration.
/// The `PacketReceiver` will be deregistered when the `Registration` is dropped.
Registers a `PacketReceiver` with the executor and returns a registration.
The `PacketReceiver` will be deregistered when the `Registration` is dropped.
Registers a ` PacketReceiver ` with the executor and returns a registration . The ` PacketReceiver ` will be deregistered when the ` Registration ` is dropped .
pub fn register_receiver<T>(&self, receiver: Arc<T>) -> ReceiverRegistration<T>
    where
        T: PacketReceiver,
    {
        let key = self.inner.receivers.lock().insert(receiver.clone()) as u64;
        ReceiverRegistration {
            ehandle: self.clone(),
            key,
            receiver,
        }
    }
pub fn register_receiver < T > ( & self , receiver : Arc < T > ) -> ReceiverRegistration < T > where T : PacketReceiver , { let key = self . inner . receivers . lock ( ) . insert ( receiver . clone ( ) ) as u64 ; ReceiverRegistration { ehandle : self . clone ( ) , key , receiver , } }
Registers a `PacketReceiver` with the executor and returns a registration.
Registers a ` PacketReceiver ` with the executor and returns a registration .
&self
receiver
Arc<T>