pub struct StatsQuery {
pub stream: bool,
pub interval: Option<u32>,
}Expand description
Query parameters for container stats.
When stream=false (default), the handler returns a single JSON
ContainerStatsResponse. When stream=true, the handler switches to
Server-Sent Events and emits one ContainerStatsResponse sample per
interval seconds until the container exits or the client disconnects.
interval is clamped to [1, 60] seconds. Default interval is 2.
Fields§
§stream: boolStream periodic samples as SSE events instead of a one-shot JSON response.
interval: Option<u32>Sample cadence in seconds (only used when stream=true). Clamped to
[1, 60]. Defaults to 2 seconds.
Trait Implementations§
Source§impl Debug for StatsQuery
impl Debug for StatsQuery
Source§impl Default for StatsQuery
impl Default for StatsQuery
Source§fn default() -> StatsQuery
fn default() -> StatsQuery
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StatsQuery
impl<'de> Deserialize<'de> for StatsQuery
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 IntoParams for StatsQuery
impl IntoParams for StatsQuery
Source§fn into_params(
parameter_in_provider: impl Fn() -> Option<ParameterIn>,
) -> Vec<Parameter>
fn into_params( parameter_in_provider: impl Fn() -> Option<ParameterIn>, ) -> Vec<Parameter>
Provide
Vec of openapi::path::Parameters to caller. The result is used in utoipa-gen library to
provide OpenAPI parameter information for the endpoint using the parameters.Auto Trait Implementations§
impl Freeze for StatsQuery
impl RefUnwindSafe for StatsQuery
impl Send for StatsQuery
impl Sync for StatsQuery
impl Unpin for StatsQuery
impl UnsafeUnpin for StatsQuery
impl UnwindSafe for StatsQuery
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