Skip to main content

RunDetailResponse

Struct RunDetailResponse 

Source
pub struct RunDetailResponse {
Show 28 fields pub id: i64, pub tag_name: String, pub notes: Option<String>, pub driver: TuneDriver, pub outcome: TuneOutcome, pub failure_reason: Option<String>, pub started_at: DateTime<Utc>, pub completed_at: Option<DateTime<Utc>>, pub template_name: String, pub template_origin: TemplateOrigin, pub allow_uncertain_quality: bool, pub config: LoopConfig, pub pid_rounding: PidRounding, pub effective_tuning: Option<EffectiveTuning>, pub opc_server: Option<String>, pub bridge_host: Option<String>, pub pid_constant_tags: Option<PidConstantTagsResponse>, pub pid_parameter_labels: PidParameterLabelsResponse, pub initial_readings: Option<InitialReadingsResponse>, pub timing_metrics: Option<TimingMetrics>, pub samples: Vec<SampleResponse>, pub results: Vec<ResultResponse>, pub writes: Vec<WriteResponse>, pub mv_actuations: Vec<MvActuationResponse>, pub restore_status: Option<RestoreStatus>, pub restore_detail: Option<String>, pub original_request: Option<StartRunRequest>, pub gateway_compatibility: Option<GatewayCompatibilityResponse>,
}

Fields§

§id: i64§tag_name: String§notes: Option<String>§driver: TuneDriver§outcome: TuneOutcome§failure_reason: Option<String>§started_at: DateTime<Utc>§completed_at: Option<DateTime<Utc>>§template_name: String

Name of the template snapshotted onto this run at start time – not necessarily what template_name currently resolves to in the catalog (safety-run-snapshot).

§template_origin: TemplateOrigin§allow_uncertain_quality: bool

Whether this run accepted Uncertain OPC quality, captured when the run started.

§config: LoopConfig§pid_rounding: PidRounding

Precision policy from the run’s immutable template snapshot.

§effective_tuning: Option<EffectiveTuning>

Concrete global timing and safety values frozen when this run was prepared. None identifies a run created before effective-tuning snapshots were stored.

§opc_server: Option<String>

The resolved OPC DA server ProgID this run actually used, or None for a simulator/replay run (db-run-request-snapshot). This is what history revert trusts over any --server flag – see bhtune_runtime::history::revert_run.

§bridge_host: Option<String>

The resolved bridge host this run actually used, matching opc_server above.

§pid_constant_tags: Option<PidConstantTagsResponse>

Some exactly when routes::runs::require_writable_run’s tag-presence check would pass – i.e. when all three PID constant tags were configured on this run. The frontend uses this (together with driver/outcome/opc_server/bridge_host) to decide whether the post-hoc write/revert buttons are enabled and, when they are not, to explain why – without duplicating require_writable_run’s logic client-side or discovering ineligibility only after a failed request (api-post-run-write).

§pid_parameter_labels: PidParameterLabelsResponse

Operator-facing calculated-result column labels from the run’s historical template snapshot. Empty user-template suffixes use the conventional P/I/D labels.

§initial_readings: Option<InitialReadingsResponse>§timing_metrics: Option<TimingMetrics>§samples: Vec<SampleResponse>§results: Vec<ResultResponse>§writes: Vec<WriteResponse>§mv_actuations: Vec<MvActuationResponse>§restore_status: Option<RestoreStatus>§restore_detail: Option<String>§original_request: Option<StartRunRequest>

This run’s own request_json (db-run-request-snapshot), parsed back into a StartRunRequest, or None if it isn’t usable – see parse_stored_request. Powers the run detail page’s “Duplicate this run” action (ui-prefill-last-run): unlike GET /api/runs/last-request, which only ever answers for the single newest run, this lets the New tune form seed itself from this specific historical run regardless of how many later runs exist.

§gateway_compatibility: Option<GatewayCompatibilityResponse>

Gateway protocol snapshot recorded before this run’s live mutation, when the run used OPC DA. None for simulator/replay runs and for OPC runs that predate the snapshot.

Trait Implementations§

Source§

impl ComposeSchema for RunDetailResponse

Source§

fn compose(generics: Vec<RefOr<Schema>>) -> RefOr<Schema>

Source§

impl Debug for RunDetailResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for RunDetailResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ToSchema for RunDetailResponse

Source§

fn name() -> Cow<'static, str>

Return name of the schema. Read more
Source§

fn schemas(schemas: &mut Vec<(String, RefOr<Schema>)>)

Implement reference [utoipa::openapi::schema::Schema]s for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> PartialSchema for T
where T: ComposeSchema + ?Sized,

§

fn schema() -> RefOr<Schema>

Return ref or schema of implementing type that can then be used to construct combined schemas.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more