pub struct RegistryRpcHandler<R: Reactor> { /* private fields */ }Expand description
A PluginRpcHandler backed by a locked PluginRegistry.
Each RPC call acquires the mutex for the duration of the operation.
For plugin.reload, the handler re-loads from the same path that was
recorded at plugin.load time; see RegistryRpcHandler::with_wasm_host.
Implementations§
Source§impl<R: Reactor> RegistryRpcHandler<R>
impl<R: Reactor> RegistryRpcHandler<R>
Sourcepub fn with_registry(registry: Arc<Mutex<PluginRegistry<R>>>) -> Self
pub fn with_registry(registry: Arc<Mutex<PluginRegistry<R>>>) -> Self
Attach an existing registry (e.g., pre-loaded with static plugins).
Sourcepub fn with_wasm_host(self, host: Arc<dyn WasmHost>) -> Self
pub fn with_wasm_host(self, host: Arc<dyn WasmHost>) -> Self
Enable WASM plugin loading with the given WasmHost.
Sourcepub fn registry(&self) -> Arc<Mutex<PluginRegistry<R>>>
pub fn registry(&self) -> Arc<Mutex<PluginRegistry<R>>>
Expose the underlying registry for spawning actors.
Trait Implementations§
Source§impl<R: Reactor> Default for RegistryRpcHandler<R>
impl<R: Reactor> Default for RegistryRpcHandler<R>
Source§impl<R: Reactor> PluginRpcHandler<R> for RegistryRpcHandler<R>
impl<R: Reactor> PluginRpcHandler<R> for RegistryRpcHandler<R>
Source§fn list_plugins(&self) -> Vec<Value>
fn list_plugins(&self) -> Vec<Value>
List all currently loaded plugins.
Source§fn load_plugin(&self, path_str: &str) -> Result<Value, String>
fn load_plugin(&self, path_str: &str) -> Result<Value, String>
Load a plugin from the given file path. Returns plugin info on success.
Auto Trait Implementations§
impl<R> Freeze for RegistryRpcHandler<R>
impl<R> !RefUnwindSafe for RegistryRpcHandler<R>
impl<R> Send for RegistryRpcHandler<R>
impl<R> Sync for RegistryRpcHandler<R>
impl<R> Unpin for RegistryRpcHandler<R>
impl<R> UnsafeUnpin for RegistryRpcHandler<R>
impl<R> !UnwindSafe for RegistryRpcHandler<R>
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