pub struct InterceptorWithNext { /* private fields */ }Expand description
Supports the composition of interceptors
Implementations§
Source§impl InterceptorWithNext
impl InterceptorWithNext
Sourcepub fn new(inner: Box<dyn WorkerInterceptor>) -> Self
pub fn new(inner: Box<dyn WorkerInterceptor>) -> Self
Create from an existing interceptor, can be used to initialize a chain of interceptors
Sourcepub fn set_next(
&mut self,
next: Box<dyn WorkerInterceptor>,
) -> &mut InterceptorWithNext
pub fn set_next( &mut self, next: Box<dyn WorkerInterceptor>, ) -> &mut InterceptorWithNext
Sets the next interceptor, and then returns that interceptor, wrapped by InterceptorWithNext. You can keep calling this method on it to extend the chain.
Trait Implementations§
Source§impl WorkerInterceptor for InterceptorWithNext
impl WorkerInterceptor for InterceptorWithNext
Source§fn on_workflow_activation_completion<'life0, 'life1, 'async_trait>(
&'life0 self,
c: &'life1 WorkflowActivationCompletion,
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_workflow_activation_completion<'life0, 'life1, 'async_trait>(
&'life0 self,
c: &'life1 WorkflowActivationCompletion,
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called every time a workflow activation completes (just before sending the completion to
core).
Source§fn on_shutdown(&self, w: &Worker)
fn on_shutdown(&self, w: &Worker)
Called after the worker has initiated shutdown and the workflow/activity polling loops
have exited, but just before waiting for the inner core worker shutdown
Source§fn on_workflow_activation<'life0, 'life1, 'async_trait>(
&'life0 self,
a: &'life1 WorkflowActivation,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_workflow_activation<'life0, 'life1, 'async_trait>(
&'life0 self,
a: &'life1 WorkflowActivation,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called every time a workflow is about to be activated
Auto Trait Implementations§
impl Freeze for InterceptorWithNext
impl !RefUnwindSafe for InterceptorWithNext
impl !Send for InterceptorWithNext
impl !Sync for InterceptorWithNext
impl Unpin for InterceptorWithNext
impl UnsafeUnpin for InterceptorWithNext
impl !UnwindSafe for InterceptorWithNext
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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