pub struct HealthResponse {
pub state: HealthState,
pub reason: Option<String>,
pub detail: Option<String>,
pub model: Option<ModelSummary>,
pub capabilities: Vec<Capability>,
pub version: String,
pub pid: u32,
pub uptime_seconds: f64,
pub server_time_unix_ms: u64,
pub last_request_age_seconds: Option<f64>,
}Fields§
§state: HealthState§reason: Option<String>Machine code for a non-ready state (see reason).
detail: Option<String>Human sentence for a non-ready state.
model: Option<ModelSummary>§capabilities: Vec<Capability>§version: String§pid: u32§uptime_seconds: f64§server_time_unix_ms: u64Server wall clock at the moment of the answer. The browser’s own clock is not trusted for anything the server timestamps – a skewed client would otherwise render negative durations.
last_request_age_seconds: Option<f64>Seconds since this process last finished a request, when it has served one. A GPU saturated by a long decode can starve the health handler; a client that sees recent request activity has positive evidence of liveness and must not declare the backend dead on a single slow poll.
Implementations§
Source§impl HealthResponse
impl HealthResponse
Sourcepub fn capability(&self, id: &str) -> Option<&Capability>
pub fn capability(&self, id: &str) -> Option<&Capability>
Look up a capability by id (see capability).
Trait Implementations§
Source§impl Clone for HealthResponse
impl Clone for HealthResponse
Source§fn clone(&self) -> HealthResponse
fn clone(&self) -> HealthResponse
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 moreSource§impl Debug for HealthResponse
impl Debug for HealthResponse
Source§impl<'de> Deserialize<'de> for HealthResponse
impl<'de> Deserialize<'de> for HealthResponse
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
Source§impl PartialEq for HealthResponse
impl PartialEq for HealthResponse
Source§impl Serialize for HealthResponse
impl Serialize for HealthResponse
impl StructuralPartialEq for HealthResponse
Auto Trait Implementations§
impl Freeze for HealthResponse
impl RefUnwindSafe for HealthResponse
impl Send for HealthResponse
impl Sync for HealthResponse
impl Unpin for HealthResponse
impl UnsafeUnpin for HealthResponse
impl UnwindSafe for HealthResponse
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