pub struct HostRuntime<P> {
plugin: P,
meta: PluginMeta,
plugin_id: String,
_node: Node<IpcService>,
task_server: TaskServer,
daemon_event_sub: DaemonEventSubscriber,
plugin_event_pub: PluginEventPublisher,
result_pub: ResultPublisher,
result_subscriptions: Vec<(String, ResultSubscriber)>,
wakeup_listener: PluginWakeupListener,
shutdown: AtomicBool,
}Expand description
Host plugin runtime with WaitSet-driven event loop.
Fields§
§plugin: P§meta: PluginMeta§plugin_id: String§_node: Node<IpcService>§task_server: TaskServer§daemon_event_sub: DaemonEventSubscriber§plugin_event_pub: PluginEventPublisher§result_pub: ResultPublisher§result_subscriptions: Vec<(String, ResultSubscriber)>§wakeup_listener: PluginWakeupListener§shutdown: AtomicBoolImplementations§
Source§impl<P: HostPlugin> HostRuntime<P>
impl<P: HostPlugin> HostRuntime<P>
Sourcepub fn new(
plugin: P,
meta: PluginMeta,
subscribed_plugins: &[&str],
) -> Result<Self>
pub fn new( plugin: P, meta: PluginMeta, subscribed_plugins: &[&str], ) -> Result<Self>
Create a new host plugin runtime.
subscribed_plugins is the list of plugin IDs this plugin subscribes to
for event/result chaining (declared via macro).
fn drain_tasks(&self)
fn drain_daemon_events(&self)
fn drain_result_subscriptions(&self)
fn handle_task(&self, active_request: ActiveTaskRequest)
Auto Trait Implementations§
impl<P> !Freeze for HostRuntime<P>
impl<P> !RefUnwindSafe for HostRuntime<P>
impl<P> Send for HostRuntime<P>where
P: Send,
impl<P> Sync for HostRuntime<P>where
P: Sync,
impl<P> Unpin for HostRuntime<P>where
P: Unpin,
impl<P> UnsafeUnpin for HostRuntime<P>where
P: UnsafeUnpin,
impl<P> !UnwindSafe for HostRuntime<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].