fn push_unready(&mut self, key: D::Key, svc: D::Service) {
        let peer_version = svc.version();
        let (tx, rx) = oneshot::channel();

        self.unready_services.push(UnreadyService {
            key: Some(key),
            service: Some(svc),
            cancel: rx,
            _req: PhantomData,
        });

        if peer_version >= self.minimum_peer_version.current() {
            self.cancel_handles.insert(key, tx);
        } else {
            // Cancel any request made to the service because it is using an outdated protocol
            // version.
            let _ = tx.send(CancelClientWork);
        }
    }
/// Adds a busy service to the unready list if it's for a peer with a supported version,
/// and adds a cancel handle for the service's current request.
///
/// If the service is for a connection to an outdated peer, the request is cancelled and the
/// service is dropped.
Adds a busy service to the unready list if it's for a peer with a supported version,
and adds a cancel handle for the service's current request.

If the service is for a connection to an outdated peer, the request is cancelled and the
service is dropped.
Adds a busy service to the unready list if it ' s for a peer with a supported version and adds a cancel handle for the service ' s current request . If the service is for a connection to an outdated peer the request is cancelled and the service is dropped .
fn push_unready(&mut self, key: D::Key, svc: D::Service) {
        let peer_version = svc.version();
        let (tx, rx) = oneshot::channel();
        self.unready_services.push(UnreadyService {
            key: Some(key),
            service: Some(svc),
            cancel: rx,
            _req: PhantomData,
        });
        if peer_version >= self.minimum_peer_version.current() {
            self.cancel_handles.insert(key, tx);
        } else {
            // Cancel any request made to the service because it is using an outdated protocol
            // version.
            let _ = tx.send(CancelClientWork);
        }
    }
fn push_unready ( & mut self , key : D :: Key , svc : D :: Service ) { let peer_version = svc . version ( ) ; let ( tx , rx ) = oneshot :: channel ( ) ; self . unready_services . push ( UnreadyService { key : Some ( key ) , service : Some ( svc ) , cancel : rx , _req : PhantomData , } ) ; if peer_version >= self . minimum_peer_version . current ( ) { self . cancel_handles . insert ( key , tx ) ; } else { // Cancel any request made to the service because it is using an outdated protocol // version. let _ = tx . send ( CancelClientWork ) ; } }
Adds a busy service to the unready list if it's for a peer with a supported version,
and adds a cancel handle for the service's current request.
Adds a busy service to the unready list if it ' s for a peer with a supported version and adds a cancel handle for the service ' s current request .
&mut self
key
D::Key
svc
D::Service