pub struct Wrapped<T, W> {
    pub inner: T,
    pub wrapper: W,
}
Expand description

A basic wrapped object.

Consists of the inner object and the wrapper state.

Implementation

To implement a wrapper type, define struct MyWrapper and implement impl<T: Environment> Environment for Wrapped<T, MyWrapper> and impl<T: EnvStructure> EnvStructure for Wrapped<T, MyWrapper>.

Fields

inner: T

Wrapped object

wrapper: W

The wrapper

Implementations

Trait Implementations

Environment observation type.

Environment action type.

Environment feedback type.

Environment observation space type.

Environment action space type.

Environment feedback space type.

Type of environment to build

Build an environment instance. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Sample an environment from the distribution. Read more

Space containing all possible observations. Read more

The space of all possible actions. Read more

The space of all possible feedback. Read more

A discount factor applied to future feedback. Read more

Space containing all possible observations. Read more

The space of all possible actions. Read more

The space of all possible feedback. Read more

A discount factor applied to future feedback. Read more

(inner_state, step_count)

Observation of the state provided to the agent.

Action selected by the agent.

Feedback provided to a learning agent as the result of each step. Reward, for example. Read more

Sample a state for the start of a new episode. Read more

Generate an observation for a given state.

Perform a state transition in reponse to an action. Read more

Run this environment with the given actor.

(Inner state, remaining episodes)

Observation of the state provided to the agent.

Action selected by the agent.

Feedback provided to a learning agent as the result of each step. Reward, for example. Read more

Sample a state for the start of a new episode. Read more

Generate an observation for a given state.

Perform a state transition in reponse to an action. Read more

Run this environment with the given actor.

(inner_state, step_count)

Observation of the state provided to the agent.

Action selected by the agent.

Feedback provided to a learning agent as the result of each step. Reward, for example. Read more

Sample a state for the start of a new episode. Read more

Generate an observation for a given state.

Perform a state transition in reponse to an action. Read more

Run this environment with the given actor.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Convert into an Any trait reference.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.