pub struct PluginContext {
pub executor: Arc<dyn Executor>,
pub shutdown: Receiver<bool>,
pub rpc_registrar: Option<Arc<dyn RpcRegistrar>>,
pub health_registry: Option<Arc<dyn HealthRegistry>>,
pub metrics_registry: Option<Arc<dyn MetricsRegistry>>,
}Expand description
What every plugin receives in Plugin::boot.
All fields are cheaply cloneable (Arc or Receiver).
Fields§
§executor: Arc<dyn Executor>Send work to a PHP worker.
shutdown: Receiver<bool>Fires true when the server is shutting down.
rpc_registrar: Option<Arc<dyn RpcRegistrar>>Register RPC method handlers. None if not available.
health_registry: Option<Arc<dyn HealthRegistry>>Register health checks. None if not available.
metrics_registry: Option<Arc<dyn MetricsRegistry>>Register metrics. None if not available.
Trait Implementations§
Source§impl Clone for PluginContext
impl Clone for PluginContext
Source§fn clone(&self) -> PluginContext
fn clone(&self) -> PluginContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PluginContext
impl !RefUnwindSafe for PluginContext
impl Send for PluginContext
impl Sync for PluginContext
impl Unpin for PluginContext
impl UnsafeUnpin for PluginContext
impl !UnwindSafe for PluginContext
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