Skip to main content

hydr_structures/structures/controlled_gate/
trial.rs

1//! Ownership-based acceptance of complete controller and actuator candidates.
2
3use super::ControlledGateBatch;
4use crate::structures::{GateActuatorBatch, OperatingControlBatch};
5use numr::dtype::DType;
6use numr::runtime::Runtime;
7
8/// Complete immutable candidate pair. Discarding it preserves both accepted children.
9#[derive(Clone, Debug)]
10pub struct ControlledGateTrial<R: Runtime<DType = DType>> {
11    pub(crate) next: ControlledGateBatch<R>,
12}
13
14impl<R: Runtime<DType = DType>> ControlledGateTrial<R> {
15    /// Candidate commands and their complete bounded decision diagnostics.
16    pub fn controls(&self) -> &OperatingControlBatch<R> {
17        self.next.controls()
18    }
19
20    /// Candidate actual opening and its complete bounded response diagnostics.
21    pub fn actuators(&self) -> &GateActuatorBatch<R> {
22        self.next.actuators()
23    }
24
25    /// Accept both complete candidate children by ownership without state projection.
26    pub fn into_next(self) -> ControlledGateBatch<R> {
27        self.next
28    }
29}