oa::ml::environment::Environment

Stateful native vector-environment behavior. Implementations own semantic environment state and embed exactly one EnvironmentExecution. Public default methods own transaction state, validation boundaries, submission, and rollback; implementations only author reset/step/reset-completed commands and transactional host metadata.

TrRust public API

Declaration

pub trait Environment { Show 19 methods // Required methods fn engine(&self) -> &Engine; fn spec(&self) -> &EnvironmentSpec; fn environments(&self) -> u32; fn observation(&self) -> &Matrix; fn execution(&self) -> &EnvironmentExecution; fn execution_mut(&mut self) -> &mut EnvironmentExecution; fn record_reset(&mut self, seed: u64) -> Result<()>; fn record_step(&mut self, action: &Matrix) -> Result<EnvironmentTransition>; fn record_reset_completed(&mut self) -> Result<()>; // Provided methods fn commit_recorded_state(&mut self) { ... } fn rollback_recorded_state(&mut self) { ... } fn begin(&mut self) -> Result<()> { ... } fn reset(&mut self, seed: u64) -> Result<()> { ... } fn step(&mut self, action: &Matrix) -> Result<EnvironmentTransition> { ... } fn reset_completed(&mut self) -> Result<()> { ... } fn submit(&mut self) -> Result<Event> { ... } fn wait(&mut self, event: &Event) -> Result<()> { ... } fn cancel(&mut self) -> Result<()> { ... } fn close(&mut self) -> Result<()> { ... } }
Public Rust declaration.

Public Methods

fn engine(&self) -> &Engine
fn spec(&self) -> &EnvironmentSpec
fn environments(&self) -> u32
fn observation(&self) -> &Matrix
fn execution(&self) -> &EnvironmentExecution
fn execution_mut(&mut self) -> &mut EnvironmentExecution
fn record_reset(&mut self, seed: u64) -> Result<()>
fn record_step(&mut self, action: &Matrix) -> Result<EnvironmentTransition>
fn record_reset_completed(&mut self) -> Result<()>
fn commit_recorded_state(&mut self)
fn rollback_recorded_state(&mut self)
fn begin(&mut self) -> Result<()>
fn reset(&mut self, seed: u64) -> Result<()>
fn step(&mut self, action: &Matrix) -> Result<EnvironmentTransition>
fn reset_completed(&mut self) -> Result<()>
fn submit(&mut self) -> Result<Event>
fn wait(&mut self, event: &Event) -> Result<()>
fn cancel(&mut self) -> Result<()>
fn close(&mut self) -> Result<()>

Public Method Documentation

fn engine( &self ) -> &Engine
No public source comment is attached to this declaration.
fn spec( &self ) -> &EnvironmentSpec
No public source comment is attached to this declaration.
fn environments( &self ) -> u32
No public source comment is attached to this declaration.
fn observation( &self ) -> &Matrix
No public source comment is attached to this declaration.
fn execution( &self ) -> &EnvironmentExecution
No public source comment is attached to this declaration.
fn execution_mut( &mut self ) -> &mut EnvironmentExecution
No public source comment is attached to this declaration.
fn record_reset(&mut self, seed: u64) -> Result<()>
No public source comment is attached to this declaration.
fn record_step( &mut self, action: &Matrix ) -> Result<EnvironmentTransition>
No public source comment is attached to this declaration.
fn record_reset_completed(&mut self) -> Result<()>
No public source comment is attached to this declaration.
fn commit_recorded_state( &mut self )
No public source comment is attached to this declaration.
fn rollback_recorded_state( &mut self )
No public source comment is attached to this declaration.
fn begin(&mut self) -> Result<()>
No public source comment is attached to this declaration.
fn reset(&mut self, seed: u64) -> Result<()>
No public source comment is attached to this declaration.
fn step( &mut self, action: &Matrix ) -> Result<EnvironmentTransition>
No public source comment is attached to this declaration.
fn reset_completed(&mut self) -> Result<()>
No public source comment is attached to this declaration.
fn submit( &mut self ) -> Result<Event>
No public source comment is attached to this declaration.
fn wait(&mut self, event: &Event) -> Result<()>
No public source comment is attached to this declaration.
fn cancel(&mut self) -> Result<()>
No public source comment is attached to this declaration.
fn close(&mut self) -> Result<()>
No public source comment is attached to this declaration.