fn request_stop_listening(&mut self) -> Result<()> {
        use Response::*;

        let request_id = 0;
        self.write(&Request::StopListening { request_id })?;

        match self.read_response()? {
            Ok { response_id } => {
                Self::check_response_id(request_id, response_id)?;
                Result::Ok(())
            }
            PermissionDenied {
                response_id,
                reason,
            } => {
                Self::check_response_id(request_id, response_id)?;
                Err(Error::PermissionDenied(reason))
            }
            Failure {
                response_id,
                reason,
            } => {
                Self::check_response_id(request_id, response_id)?;
                Err(Error::RequestFailure(reason))
            }
            response => Err(Error::InvalidServerResponse(
                "Expected Response: Ok, PermissionDenied or Failure",
                response,
            )),
        }
    }
/// Request the master to stop accepting new multiplexing requests
/// and remove its listener socket.
Request the master to stop accepting new multiplexing requests
and remove its listener socket.
Request the master to stop accepting new multiplexing requests and remove its listener socket .
fn request_stop_listening(&mut self) -> Result<()> {
        use Response::*;
        let request_id = 0;
        self.write(&Request::StopListening { request_id })?;
        match self.read_response()? {
            Ok { response_id } => {
                Self::check_response_id(request_id, response_id)?;
                Result::Ok(())
            }
            PermissionDenied {
                response_id,
                reason,
            } => {
                Self::check_response_id(request_id, response_id)?;
                Err(Error::PermissionDenied(reason))
            }
            Failure {
                response_id,
                reason,
            } => {
                Self::check_response_id(request_id, response_id)?;
                Err(Error::RequestFailure(reason))
            }
            response => Err(Error::InvalidServerResponse(
                "Expected Response: Ok, PermissionDenied or Failure",
                response,
            )),
        }
    }
fn request_stop_listening ( & mut self ) -> Result < ( ) > { use Response :: * ; let request_id = 0 ; self . write ( & Request :: StopListening { request_id } ) ? ; match self . read_response ( ) ? { Ok { response_id } => { Self :: check_response_id ( request_id , response_id ) ? ; Result :: Ok ( ( ) ) } PermissionDenied { response_id , reason , } => { Self :: check_response_id ( request_id , response_id ) ? ; Err ( Error :: PermissionDenied ( reason ) ) } Failure { response_id , reason , } => { Self :: check_response_id ( request_id , response_id ) ? ; Err ( Error :: RequestFailure ( reason ) ) } response => Err ( Error :: InvalidServerResponse ( " " , response , ) ) , } }
Request the master to stop accepting new multiplexing requests
and remove its listener socket.
Request the master to stop accepting new multiplexing requests and remove its listener socket .
&mut self