hydr_structures/structures/controlled_pump/
trial.rs1use super::{ControlledPumpBatch, ControlledPumpOutput};
4use crate::structures::{OperatingControlBatch, StructureError, StructureOperation};
5use numr::dtype::DType;
6use numr::runtime::Runtime;
7
8#[derive(Clone, Debug)]
10pub struct ControlledPumpTrial<R: Runtime<DType = DType>> {
11 pub(crate) next: ControlledPumpBatch<R>,
12}
13impl<R: Runtime<DType = DType>> ControlledPumpTrial<R> {
14 pub fn controls(&self) -> &OperatingControlBatch<R> {
16 self.next.controls()
17 }
18 pub fn outputs(&self) -> Result<Vec<ControlledPumpOutput>, StructureError>
20 where
21 R::Client: numr::ops::ConditionalOps<R>,
22 {
23 self.next.outputs()
24 }
25 pub fn operations(&self) -> Result<Vec<StructureOperation>, StructureError>
27 where
28 R::Client: numr::ops::ConditionalOps<R>,
29 {
30 self.next.operations()
31 }
32 pub fn into_next(self) -> ControlledPumpBatch<R> {
34 self.next
35 }
36}