pub trait AgentScopeExt {
// Required methods
fn bridge_worker<W>(
&self,
callback: Callback<W::Output>,
) -> WorkerBridgeHandle<W>
where W: Worker + 'static;
fn bridge_reactor<R>(
&self,
callback: Callback<ReactorEvent<R>>,
) -> ReactorBridgeHandle<R>
where R: Reactor + 'static,
<R::Scope as ReactorScoped>::Output: 'static;
fn run_oneshot<T>(&self, input: T::Input, callback: Callback<T::Output>)
where T: Oneshot + 'static;
}
Expand description
An extension to Scope
that provides communication mechanism to agents.
You can access them on ctx.link()
Required Methods§
Sourcefn bridge_worker<W>(
&self,
callback: Callback<W::Output>,
) -> WorkerBridgeHandle<W>where
W: Worker + 'static,
fn bridge_worker<W>(
&self,
callback: Callback<W::Output>,
) -> WorkerBridgeHandle<W>where
W: Worker + 'static,
Bridges to a Worker Agent.
Sourcefn bridge_reactor<R>(
&self,
callback: Callback<ReactorEvent<R>>,
) -> ReactorBridgeHandle<R>
fn bridge_reactor<R>( &self, callback: Callback<ReactorEvent<R>>, ) -> ReactorBridgeHandle<R>
Bridges to a Reactor Agent.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.