rlmesh::env::EnvFactoryExt
Construction, stamping and serving operations for every EnvFactory.
trait EnvFactoryExt: EnvFactory + sealed::SealedAlso available as rlmesh::EnvFactoryExt.
Provided methods
- make_env()
makewith the kwargs bound (each discriminant's default applied; a value outside its choices is the ValueError class beforemakeruns), then stamped: the branch's tags, the branch underENV_BRANCH_METADATA_KEY, andreset_optionsunderENV_RESET_OPTIONS_KEY. - describe()This factory type's describe envelope.
- serve()Host this factory's env on
address, blocking. - serve_async()The async twin of
serve: the pre-serve hooks run on the polling thread inside the first poll, then every lane serves from library threads; dropping the future stops the server and closes the envs it made.
make_env
provided method[source]fn make_env(&mut self, kwargs: &Kwargs) -> Result<MadeEnv>make with the kwargs bound (each discriminant’s default applied;
a value outside its choices is the ValueError class before make
runs), then stamped: the branch’s tags, the branch under
ENV_BRANCH_METADATA_KEY, and reset_options under
ENV_RESET_OPTIONS_KEY.
describe
provided method[source]fn describe() -> Result<Metadata> where Self: DefaultThis factory type’s describe envelope. Best-effort: each build
default-constructs a factory, and a failed build or space read is an
env_spec badge.
serve
provided method[source]fn serve(
&mut self,
address: &str,
options: EnvFactoryServeOptions,
) -> Result<()>Host this factory’s env on address, blocking. Runs the branch check
and prepare(), makes one env (or num_envs lanes), resolves the
edition, publishes the describe envelope on the handshake, and serves
in the foreground. The factory is not closed.
serve_async
provided method[source]fn serve_async(
&mut self,
address: &str,
options: EnvFactoryServeOptions,
) -> impl std::future::Future<Output = Result<()>>The async twin of serve: the pre-serve hooks run on
the polling thread inside the first poll, then every lane serves from
library threads; dropping the future stops the server and closes the
envs it made.