pub struct ClientAndWorkerPlugin { /* private fields */ }Expand description
A container for a plugin that implements both ClientPlugin and
WorkerPlugin.
This wrapper is only needed when the same plugin configures both a client and workers.
One-sided plugins can implement ClientPlugin or WorkerPlugin directly.
When registered on ClientOptions, the resulting client carries the worker plugin and
automatically applies it to workers created from that client. Do not also register the plugin
on WorkerOptions, or its worker configuration will be applied twice.
let plugin = ClientAndWorkerPlugin::new(MyPlugin);
let client_options = ClientOptions::new("default").plugin(plugin).build();Experimental: This API may change or be removed.
Implementations§
Source§impl ClientAndWorkerPlugin
impl ClientAndWorkerPlugin
Sourcepub fn new<P>(plugin: P) -> Selfwhere
P: ClientPlugin + WorkerPlugin,
pub fn new<P>(plugin: P) -> Selfwhere
P: ClientPlugin + WorkerPlugin,
Type-erase one plugin value for client registration, automatic worker propagation, and optional explicit worker registration.
Trait Implementations§
Source§impl Clone for ClientAndWorkerPlugin
impl Clone for ClientAndWorkerPlugin
Source§fn clone(&self) -> ClientAndWorkerPlugin
fn clone(&self) -> ClientAndWorkerPlugin
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 moreSource§impl From<ClientAndWorkerPlugin> for ErasedClientPlugin
impl From<ClientAndWorkerPlugin> for ErasedClientPlugin
Source§fn from(plugin: ClientAndWorkerPlugin) -> Self
fn from(plugin: ClientAndWorkerPlugin) -> Self
Converts to this type from the input type.
Source§impl WorkerPlugin for ClientAndWorkerPlugin
impl WorkerPlugin for ClientAndWorkerPlugin
Source§fn configure_worker_options(
&self,
options: &mut WorkerOptions,
) -> Result<(), PluginError>
fn configure_worker_options( &self, options: &mut WorkerOptions, ) -> Result<(), PluginError>
Configure worker options. Read more
Source§fn configure_workflow_replayer_options(
&self,
options: &mut WorkflowReplayerOptions,
) -> Result<(), PluginError>
fn configure_workflow_replayer_options( &self, options: &mut WorkflowReplayerOptions, ) -> Result<(), PluginError>
Configure workflow replayer options. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ClientAndWorkerPlugin
impl !UnwindSafe for ClientAndWorkerPlugin
impl Freeze for ClientAndWorkerPlugin
impl Send for ClientAndWorkerPlugin
impl Sync for ClientAndWorkerPlugin
impl Unpin for ClientAndWorkerPlugin
impl UnsafeUnpin for ClientAndWorkerPlugin
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request