fn export_inflight_metrics(&self) -> ApiResponse {
        // TODO: Implement automatic error conversion between DaemonError and ApiError.
        let d = self.daemon.as_ref();
        if let Some(ops) = d
            .export_inflight_ops()
            .map_err(|e| ApiError::Metrics(MetricsErrorKind::Daemon(e.into())))?
        {
            Ok(ApiResponsePayload::InflightMetrics(ops))
        } else {
            Ok(ApiResponsePayload::Empty)
        }
    }
/// Detect if there is fop being hang.
/// `ApiResponsePayload::Empty` will be converted to http status code 204, which means
/// there is no requests being processed right now.
/// Otherwise, json body within http response is provided,
/// ```json
/// [
///  {
///    "inode": 72057594037929010,
///    "opcode": 44,
///    "unique": 22728,
///    "timestamp_secs": 1612245570
///  },
///  {
///    "inode": 72057594037928480,
///    "opcode": 15,
///    "unique": 22656,
///    "timestamp_secs": 1612245570
///  },
///  {
///    "inode": 72057594037928940,
///    "opcode": 15,
///    "unique": 22700,
///    "timestamp_secs": 1612245570
///  }
/// ]
/// It means 3 threads are processing inflight requests.
Detect if there is fop being hang.
`ApiResponsePayload::Empty` will be converted to http status code 204, which means
there is no requests being processed right now.
Detect if there is fop being hang . ` ApiResponsePayload :: Empty ` will be converted to http status code 204 which means there is no requests being processed right now .
fn export_inflight_metrics(&self) -> ApiResponse {
        // TODO: Implement automatic error conversion between DaemonError and ApiError.
        let d = self.daemon.as_ref();
        if let Some(ops) = d
            .export_inflight_ops()
            .map_err(|e| ApiError::Metrics(MetricsErrorKind::Daemon(e.into())))?
        {
            Ok(ApiResponsePayload::InflightMetrics(ops))
        } else {
            Ok(ApiResponsePayload::Empty)
        }
    }
fn export_inflight_metrics ( & self ) -> ApiResponse { // TODO: Implement automatic error conversion between DaemonError and ApiError. let d = self . daemon . as_ref ( ) ; if let Some ( ops ) = d . export_inflight_ops ( ) . map_err ( | e | ApiError :: Metrics ( MetricsErrorKind :: Daemon ( e . into ( ) ) ) ) ? { Ok ( ApiResponsePayload :: InflightMetrics ( ops ) ) } else { Ok ( ApiResponsePayload :: Empty ) } }
Detect if there is fop being hang.
Detect if there is fop being hang .
&self
&self