Skip to main content

ToAction

Trait ToAction 

pub trait ToAction<A> {
    // Required method
    fn to_action(&self, device: &Device) -> A;
}
Expand description

Defines how an environment’s action is converted to a policy’s action.

Required Methods§

fn to_action(&self, device: &Device) -> A

Convert an environment’s action to a policy’s action, moving it to the given device if needed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§