rlmesh::RemoteModel
A served model (policy) to bind envs to.
struct RemoteModel(/* private field */)Construction does no I/O: it checks the address and timeouts, and
session dials. Clones share the handle; it is
Send + Sync, and concurrent sessions off one handle are allowed.
Associated functions
Methods
new
associated function[source]fn new(options: RemoteModelOptions) -> Result<RemoteModel>Check the address and timeouts (the ValueError class) and keep the
address as given, so "127.0.0.1:5555" stays scheme-less.
address
method[source]fn address(&self) -> &strThe model endpoint this handle dials, as given (normalized, not canonicalized).
session
method[source]fn session<'a>(
&'a self, env: impl Into<EnvTarget<'a>>,
options: SessionOptions,
) -> Result<Session<'a>>Bind this served model to env and dial it. env is an address
(dialed now and owned by the session), an
EnvServer (dialed at first env use), or a
borrowed RemoteEnv; a local env is the
TypeError class and a multi-lane target the ValueError class.
trust_entrypoints set is the ValueError class (the served model
owns its adapter).
session_async
method[source]async fn session_async<'a>(
&'a self, env: impl Into<EnvTarget<'a>>,
options: SessionOptions,
) -> Result<Session<'a>>The async twin of session.
Trait implementations
- impl Clone for RemoteModel
- impl Display for RemoteModel
- impl Debug for RemoteModel
- impl<'a> From<&'a RemoteModel> for ModelTarget<'a>