use super::{ControlledPumpBatch, ControlledPumpOutput};
use crate::structures::{OperatingControlBatch, StructureError, StructureOperation};
use numr::dtype::DType;
use numr::runtime::Runtime;
#[derive(Clone, Debug)]
pub struct ControlledPumpTrial<R: Runtime<DType = DType>> {
pub(crate) next: ControlledPumpBatch<R>,
}
impl<R: Runtime<DType = DType>> ControlledPumpTrial<R> {
pub fn controls(&self) -> &OperatingControlBatch<R> {
self.next.controls()
}
pub fn outputs(&self) -> Result<Vec<ControlledPumpOutput>, StructureError>
where
R::Client: numr::ops::ConditionalOps<R>,
{
self.next.outputs()
}
pub fn operations(&self) -> Result<Vec<StructureOperation>, StructureError>
where
R::Client: numr::ops::ConditionalOps<R>,
{
self.next.operations()
}
pub fn into_next(self) -> ControlledPumpBatch<R> {
self.next
}
}