pub struct UpcasterGrpcHandler { /* private fields */ }Expand description
gRPC upcaster service implementation.
Wraps a handle function to transform events to current versions.
Implementations§
Source§impl UpcasterGrpcHandler
impl UpcasterGrpcHandler
Sourcepub fn new(name: impl Into<String>, domain: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, domain: impl Into<String>) -> Self
Create a new upcaster handler.
Sourcepub fn with_handle(self, handle_fn: UpcasterHandleFn) -> Self
pub fn with_handle(self, handle_fn: UpcasterHandleFn) -> Self
Set the handle function (function pointer).
Sourcepub fn with_handle_fn<H>(self, handle_fn: H) -> Self
pub fn with_handle_fn<H>(self, handle_fn: H) -> Self
Set the handle function (closure).
Trait Implementations§
Source§impl UpcasterService for UpcasterGrpcHandler
impl UpcasterService for UpcasterGrpcHandler
Source§fn upcast<'life0, 'async_trait>(
&'life0 self,
request: Request<UpcastRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UpcastResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upcast<'life0, 'async_trait>(
&'life0 self,
request: Request<UpcastRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UpcastResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Transform events to current version
Returns events in same order, transformed where applicable
Auto Trait Implementations§
impl Freeze for UpcasterGrpcHandler
impl !RefUnwindSafe for UpcasterGrpcHandler
impl Send for UpcasterGrpcHandler
impl Sync for UpcasterGrpcHandler
impl Unpin for UpcasterGrpcHandler
impl UnsafeUnpin for UpcasterGrpcHandler
impl !UnwindSafe for UpcasterGrpcHandler
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> 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> 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