pub struct ConnectionCounts {
pub read_deadline_seconds: u64,
pub closed_by_deadline: u64,
pub refused_busy: u64,
}Expand description
What this process’s HTTP server has done to clients that held a connection without using it: the deadline it applies and what that deadline cost, since the process started. Absent while this process serves no HTTP.
use majordomus_cli::http::deadline::{counts, ConnectionCounts};
// a process that has started no server reports nothing, rather than zeroes that would
// read as "no slow client was seen"
assert_eq!(counts(), None);
let c = ConnectionCounts { read_deadline_seconds: 30, closed_by_deadline: 4, refused_busy: 0 };
let text = serde_json::to_string(&c).unwrap();
assert_eq!(serde_json::from_str::<ConnectionCounts>(&text).unwrap(), c);Fields§
§read_deadline_seconds: u64server.read_deadline_seconds: as this process applies it.
closed_by_deadline: u64Connections closed because no request was read in full on them within the deadline.
refused_busy: u64Requests answered 503 because every request handler was busy.
Trait Implementations§
Source§impl Clone for ConnectionCounts
impl Clone for ConnectionCounts
Source§fn clone(&self) -> ConnectionCounts
fn clone(&self) -> ConnectionCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ConnectionCounts
Source§impl Debug for ConnectionCounts
impl Debug for ConnectionCounts
Source§impl<'de> Deserialize<'de> for ConnectionCounts
impl<'de> Deserialize<'de> for ConnectionCounts
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ConnectionCounts
Source§impl JsonSchema for ConnectionCounts
impl JsonSchema for ConnectionCounts
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ConnectionCounts
impl PartialEq for ConnectionCounts
Source§fn eq(&self, other: &ConnectionCounts) -> bool
fn eq(&self, other: &ConnectionCounts) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ConnectionCounts
impl Serialize for ConnectionCounts
impl StructuralPartialEq for ConnectionCounts
Auto Trait Implementations§
impl Freeze for ConnectionCounts
impl RefUnwindSafe for ConnectionCounts
impl Send for ConnectionCounts
impl Sync for ConnectionCounts
impl Unpin for ConnectionCounts
impl UnsafeUnpin for ConnectionCounts
impl UnwindSafe for ConnectionCounts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.