/// Wraps an operation on the underlying transport with error telemetry.
///
/// If the transport operation results in a non-recoverable error, record a
/// transport closure.
Wraps an operation on the underlying transport with error telemetry.
If the transport operation results in a non-recoverable error, record a
transport closure.
Wraps an operation on the underlying transport with error telemetry . If the transport operation results in a non - recoverable error record a transport closure .
fn record_error<T>(&mut self, op: Poll<std::io::Result<T>>) -> Poll<std::io::Result<T>> {
        match op {
            Poll::Ready(Ok(v)) => Poll::Ready(Ok(v)),
            Poll::Ready(Err(e)) => {
                if e.kind() != std::io::ErrorKind::WouldBlock {
                    let eos = e.raw_os_error().map(|e| e.into());
                    self.record_close(eos);
                }
                Poll::Ready(Err(e))
            }
            Poll::Pending => Poll::Pending,
        }
    }
fn record_error < T > ( & mut self , op : Poll < std :: io :: Result < T > > ) -> Poll < std :: io :: Result < T > > { match op { Poll :: Ready ( Ok ( v ) ) => Poll :: Ready ( Ok ( v ) ) , Poll :: Ready ( Err ( e ) ) => { if e . kind ( ) != std :: io :: ErrorKind :: WouldBlock { let eos = e . raw_os_error ( ) . map ( | e | e . into ( ) ) ; self . record_close ( eos ) ; } Poll :: Ready ( Err ( e ) ) } Poll :: Pending => Poll :: Pending , } }
Wraps an operation on the underlying transport with error telemetry.
Wraps an operation on the underlying transport with error telemetry .
&mut self
op
Poll<std::io::Result<T>>