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

rlmesh::env::EnvFactory

traitPreviewuse rlmesh::env::EnvFactory;[source]

Builds environments.

trait EnvFactory: Sized

Override the associated functions to declare the factory’s contract. Implement make; the provided EnvFactoryExt::make_env stamps what it returns (tags, branch, reset options), and every library path uses it.

Also available as rlmesh::EnvFactory.

make

required method[source]
fn make(&mut self, kwargs: &Kwargs) -> Result<MadeEnv>

Construct an env. kwargs holds every discriminant, its default applied. The returned env is unstamped; library paths call EnvFactoryExt::make_env.

tags

provided method[source]
fn tags() -> Option<EnvTags>

The contract’s tags (default None).

tag_params

provided method[source]
fn tag_params() -> Vec<TagParam>

The contract discriminants (default none).

reset_options

provided method[source]
fn reset_options() -> Vec<String>

The reserved reset-option keys this env wants on reset (default none).

workflow_edition

provided method[source]
fn workflow_edition() -> Option<String>

The workflow edition this env was authored against (default None, floating).

tags_for

provided method[source]
fn tags_for(params: &Kwargs) -> Result<Option<EnvTags>>

The tags of one discriminant binding (default tags). Override it only alongside tag_params.

enumerate_variants

provided method[source]
fn enumerate_variants() -> Result<Option<Vec<Variant>>>

The factory’s named catalog. Ok(None) (the default) is “not defined”.

prepare

provided method[source]
fn prepare(&mut self) -> Result<()>

One-time setup before make (default nothing).

close

provided method[source]
fn close(&mut self) -> Result<()>

Release resources (default nothing). The library never closes a factory for you.