Report unknown channel count in status response

This commit is contained in:
Dominik Werder
2023-07-18 15:49:08 +02:00
parent 91947dec0f
commit 5d6358f12e
32 changed files with 596 additions and 518 deletions

View File

@@ -69,6 +69,11 @@ impl CmpZero for u32 {
*self == 0
}
}
impl CmpZero for usize {
fn is_zero(&self) -> bool {
*self == 0
}
}
pub struct BodyStream {
//pub receiver: async_channel::Receiver<Result<Bytes, Error>>,
@@ -2265,6 +2270,17 @@ impl ReadExactStats {
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Api1WarningStats {
pub subreq_fail: usize,
}
impl Api1WarningStats {
pub fn new() -> Self {
Self { subreq_fail: 0 }
}
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct ByteSize(pub u32);