rlmesh::specs::EnvContract
The contract an env endpoint serves.
struct EnvContractOnly the library builds one (an EnvServer derives
it from the env; a remote client reads it from the handshake). Clones are
independent values.
Also available as rlmesh::EnvContract.
Methods
- id()The env id (
"UnknownEnv-v1"when the env sets none). - observation_space()The space one observation belongs to.
- action_space()The space one action belongs to.
- render_mode()The env's render mode, if any.
- num_envs()The number of lanes the endpoint serves.
- metadata()The env's metadata, tags included, if any.
- env()The
envalias: a copy of this contract. - spec()The
specalias: a copy of this contract. - to_dict()A dictionary containing
id,render_mode,num_envs,metadata, and each space as{kind, shape, dtype, details}.
id
method[source]fn id(&self) -> &strThe env id ("UnknownEnv-v1" when the env sets none).
observation_space
method[source]fn observation_space(&self) -> &SpaceSpecThe space one observation belongs to.
action_space
method[source]fn action_space(&self) -> &SpaceSpecThe space one action belongs to.
render_mode
method[source]fn render_mode(&self) -> Option<&str>The env’s render mode, if any.
num_envs
method[source]fn num_envs(&self) -> u64The number of lanes the endpoint serves.
metadata
method[source]fn metadata(&self) -> Option<&Metadata>The env’s metadata, tags included, if any.
env
method[source]fn env(&self) -> EnvContractThe env alias: a copy of this contract.
spec
method[source]fn spec(&self) -> EnvContractThe spec alias: a copy of this contract.
to_dict
method[source]fn to_dict(&self) -> MetadataA dictionary containing id, render_mode, num_envs, metadata,
and each space as {kind, shape, dtype, details}.
Trait implementations
- impl Clone for EnvContract
- impl Display for EnvContract
- impl Debug for EnvContract