rlmesh::env::EnvFactory
Builds environments.
trait EnvFactory: SizedOverride 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.
Required methods
Provided methods
- tags()The contract's tags (default
None). - tag_params()The contract discriminants (default none).
- reset_options()The reserved reset-option keys this env wants on
reset(default none). - workflow_edition()The workflow edition this env was authored against (default
None, floating). - tags_for()The tags of one discriminant binding (default
tags). - enumerate_variants()The factory's named catalog.
- prepare()One-time setup before
make(default nothing). - close()Release resources (default nothing).
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.
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).
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.