use crate::{
runtime::{RunSummary, RuntimeError},
study::StudyPlan,
};
#[derive(Clone)]
struct Silent;
impl crate::runtime::RuntimeObserver for Silent {
fn publish(
&self,
_: crate::runtime::RuntimeEvent<'_>,
) -> Result<(), crate::runtime::PresentationFailure> {
Ok(())
}
fn cancellation_requested(&self) -> Result<bool, crate::runtime::PresentationFailure> {
Ok(false)
}
fn finish(&self) -> Result<(), crate::runtime::PresentationFailure> {
Ok(())
}
}
pub(crate) fn execute_options(study: StudyPlan, clean: bool) -> Result<RunSummary, RuntimeError> {
crate::runtime::execute_with_observer_options(study, || Ok(Silent), clean)
}