pub struct PluginPollerRouter { /* private fields */ }Expand description
Daemon-side router. Looks up which plugin owns a kind and
forwards tick requests via broker JSON-RPC.
Implementations§
Source§impl PluginPollerRouter
impl PluginPollerRouter
pub fn new() -> Self
Sourcepub fn register(
&self,
handle: PluginPollerHandle,
) -> Result<(), PollerRouteRegistrationError>
pub fn register( &self, handle: PluginPollerHandle, ) -> Result<(), PollerRouteRegistrationError>
Register a plugin’s poller capability. Returns an error if
any of the requested kinds is already owned by a different
plugin (cross-manifest uniqueness — boot-time fail-fast).
Re-registration of the same plugin_id is allowed and
replaces the previous entry (hot-spawn restart).
Sourcepub fn unregister(&self, plugin_id: &str) -> bool
pub fn unregister(&self, plugin_id: &str) -> bool
Drop the handle for a given plugin id (hot-remove).
Sourcepub fn handle_for_kind(&self, kind: &str) -> Option<Arc<PluginPollerHandle>>
pub fn handle_for_kind(&self, kind: &str) -> Option<Arc<PluginPollerHandle>>
Look up the handle that owns kind. Returns an Arc clone
so the caller can drop the read lock immediately.
Sourcepub fn handles_for_plugin(
&self,
plugin_id: &str,
) -> Option<Arc<PluginPollerHandle>>
pub fn handles_for_plugin( &self, plugin_id: &str, ) -> Option<Arc<PluginPollerHandle>>
Look up the handle owned by plugin_id. Used by the daemon
boot loop to wire one PluginPollerProxy per declared kind.
Trait Implementations§
Source§impl Debug for PluginPollerRouter
impl Debug for PluginPollerRouter
Source§impl Default for PluginPollerRouter
impl Default for PluginPollerRouter
Source§fn default() -> PluginPollerRouter
fn default() -> PluginPollerRouter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for PluginPollerRouter
impl RefUnwindSafe for PluginPollerRouter
impl Send for PluginPollerRouter
impl Sync for PluginPollerRouter
impl Unpin for PluginPollerRouter
impl UnsafeUnpin for PluginPollerRouter
impl UnwindSafe for PluginPollerRouter
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more