LCOV - code coverage report
Current view: top level - pageserver/src/tenant/storage_layer - errors.rs (source / functions) Coverage Total Hit
Test: 1e20c4f2b28aa592527961bb32170ebbd2c9172f.info Lines: 0.0 % 10 0
Test Date: 2025-07-16 12:29:03 Functions: 0.0 % 2 0

            Line data    Source code
       1              : use crate::tenant::blob_io::WriteBlobError;
       2              : 
       3              : #[derive(Debug, thiserror::Error)]
       4              : pub enum PutError {
       5              :     #[error(transparent)]
       6              :     WriteBlob(WriteBlobError),
       7              :     #[error(transparent)]
       8              :     Other(anyhow::Error),
       9              : }
      10              : 
      11              : impl PutError {
      12            0 :     pub fn is_cancel(&self) -> bool {
      13            0 :         match self {
      14            0 :             PutError::WriteBlob(e) => e.is_cancel(),
      15            0 :             PutError::Other(_) => false,
      16              :         }
      17            0 :     }
      18            0 :     pub fn into_anyhow(self) -> anyhow::Error {
      19            0 :         match self {
      20            0 :             PutError::WriteBlob(e) => e.into_anyhow(),
      21            0 :             PutError::Other(e) => e,
      22              :         }
      23            0 :     }
      24              : }
        

Generated by: LCOV version 2.1-beta