pub struct GatewayPlugin { /* private fields */ }Expand description
Process-wide GatewayPlugin registry storing GatewayRuntime.
Implementations§
Source§impl GatewayPlugin
Inherent implementation of GatewayPlugin.
impl GatewayPlugin
Inherent implementation of GatewayPlugin.
Sourcepub fn init(config: GatewayConfig) -> &'static Self
pub fn init(config: GatewayConfig) -> &'static Self
Initializes the global GatewayPlugin once with config.
§Arguments
GatewayConfig- Reverse-proxy and resilience configuration.
§Returns
&'static Self- Reference to the initialized global plugin.
Sourcepub fn init_runtime(runtime: GatewayRuntime) -> &'static Self
pub fn init_runtime(runtime: GatewayRuntime) -> &'static Self
Initializes the global GatewayPlugin once with a prebuilt GatewayRuntime.
§Arguments
GatewayRuntime- Compiled gateway runtime (including any attached interceptors).
§Returns
&'static Self- Reference to the initialized global plugin.
Sourcepub fn get() -> Option<&'static Self>
pub fn get() -> Option<&'static Self>
Returns the initialized global GatewayPlugin, if GatewayPlugin::init was called.
§Returns
Option<&'static Self>- Reference to the global plugin, orNone.
Sourcepub fn get_runtime(&self) -> &GatewayRuntime
pub fn get_runtime(&self) -> &GatewayRuntime
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GatewayPlugin
impl !UnwindSafe for GatewayPlugin
impl Forget for GatewayPlugin
impl Freeze for GatewayPluginwhere
*const u8 is !null: Freeze,
PhantomData<GatewayRoute>: Freeze,
*const ArcInner<[CompiledRoute]> is !null: Freeze,
PhantomData<ArcInner<[CompiledRoute]>>: Freeze,
*const ArcInner<[Arc<dyn GatewayInterceptor>]> is !null: Freeze,
PhantomData<ArcInner<[Arc<dyn GatewayInterceptor>]>>: Freeze,
impl Move for GatewayPlugin
impl Send for GatewayPlugin
impl Sync for GatewayPlugin
impl Unpin for GatewayPlugin
impl UnsafeUnpin for GatewayPluginwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<GatewayRoute>: UnsafeUnpin,
*const ArcInner<[CompiledRoute]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[CompiledRoute]>>: UnsafeUnpin,
*const ArcInner<[Arc<dyn GatewayInterceptor>]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[Arc<dyn GatewayInterceptor>]>>: UnsafeUnpin,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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