pub struct StepBuffers<'a> {
pub obs: &'a mut [f32],
pub reward: &'a mut [f32],
pub terminated: &'a mut [bool],
pub truncated: &'a mut [bool],
pub final_obs: &'a mut [f32],
}Expand description
Buffers that VecEnv::step_into writes the results of a step to, one
entry per environment; obs and final_obs hold the flat observations
(FlatObs) environment after environment.
Fields§
§obs: &'a mut [f32]The next observations (after a reset where an episode ended).
reward: &'a mut [f32]The rewards.
terminated: &'a mut [bool]Whether each episode ended in a terminal state.
truncated: &'a mut [bool]Whether each episode reached its time limit.
final_obs: &'a mut [f32]The observations reached by the step, before any reset.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for StepBuffers<'a>
impl<'a> Freeze for StepBuffers<'a>
impl<'a> RefUnwindSafe for StepBuffers<'a>
impl<'a> Send for StepBuffers<'a>
impl<'a> Sync for StepBuffers<'a>
impl<'a> Unpin for StepBuffers<'a>
impl<'a> UnsafeUnpin for StepBuffers<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more