pub mod environment_traits {
use std::any::Any;
pub use thiserror::Error;
#[derive(Debug, Error, Clone)]
pub enum EnvironmentError {
#[error("Environment error: {0}")]
EnvironmentError(String),
#[error("Observation building error: {0}")]
ObservationBuildingError(String),
#[error("Training performance return error: {0}")]
TrainingPerformanceReturnError(String),
}
pub trait EnvironmentTrait {
fn run_environment(&self) -> Result<(), EnvironmentError>;
fn build_observation(&self) -> Result<Box<dyn Any>, EnvironmentError>;
}
pub trait TrainingPerformanceReturnFn {
fn calculate_performance_return(&self) -> Result<Box<dyn Any>, EnvironmentError>;
}
}