This reference describes unreleased code on main; no release documents it yet.

rlmesh::adapters::EnvTags

structPreviewuse rlmesh::adapters::EnvTags;[source]

The semantic tags an env publishes for its observation and action spaces.

struct EnvTags

new

associated function[source]
fn new(observation: impl Into<ObsNode>, action: Action) -> Result<Self>

Construct and validate environment observation and action tags.

from_dict

associated function[source]
fn from_dict(data: &Metadata) -> Result<Self>

Read and validate a typed metadata representation.

from_json

associated function[source]
fn from_json(payload: &str) -> Result<Self>

Read and validate a JSON representation.

from_metadata

associated function[source]
fn from_metadata(metadata: &Metadata) -> Result<Option<Self>>

Read the versioned metadata key; absent or None yields None.

observation

method[source]
fn observation(&self) -> &ObsNode

The authored immutable observation tag tree.

action

method[source]
fn action(&self) -> &Action

The authored environment action layout.

to_dict

method[source]
fn to_dict(&self) -> Result<Metadata>

Validate and serialize to canonical typed metadata.

to_json

method[source]
fn to_json(&self) -> Result<String>

Serialize to canonical compact, sorted UTF-8 JSON.

to_metadata

method[source]
fn to_metadata(&self) -> Result<Metadata>

The fragment to merge into contract metadata.

observation_roles

method[source]
fn observation_roles(&self) -> ObservationRoles

Declared roles grouped by modality, in authored order.

Trait implementations

  • impl Clone for EnvTags
  • impl Debug for EnvTags
  • impl StructuralPartialEq for EnvTags
  • impl PartialEq for EnvTags
  • impl Display for EnvTags