pub struct ExternalServiceProxy<P, Publisher>where
P: Proxy,{ /* private fields */ }
Expand description
A wrapper around a proxy, used to track disconnections.
This wraps any type implementing Proxy
. Whenever any call returns a
ClientChannelClosed
error, this wrapper publishes a closed event for
the wrapped proxy.
Implementations§
Source§impl<P, Publisher> ExternalServiceProxy<P, Publisher>where
P: Proxy,
Publisher: EventPublisher,
impl<P, Publisher> ExternalServiceProxy<P, Publisher>where
P: Proxy,
Publisher: EventPublisher,
pub fn new(proxy: P, publisher: Option<Publisher>) -> Self
Sourcepub fn inspect_result<T>(
&self,
result: &Result<T, Error>,
arg_str: String,
req_timestamp: String,
resp_timestamp: String,
)where
T: Debug,
pub fn inspect_result<T>(
&self,
result: &Result<T, Error>,
arg_str: String,
req_timestamp: String,
resp_timestamp: String,
)where
T: Debug,
Handle the result
of the event sent via the call or call_async methods
and send the corresponding information to be logged to inspect.
Trait Implementations§
Source§impl<P, Publisher: Clone> Clone for ExternalServiceProxy<P, Publisher>
impl<P, Publisher: Clone> Clone for ExternalServiceProxy<P, Publisher>
Source§fn clone(&self) -> ExternalServiceProxy<P, Publisher>
fn clone(&self) -> ExternalServiceProxy<P, Publisher>
Returns a duplicate of the value. Read more
1.0.0 · 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<P, Publisher> Freeze for ExternalServiceProxy<P, Publisher>
impl<P, Publisher> RefUnwindSafe for ExternalServiceProxy<P, Publisher>where
P: RefUnwindSafe,
Publisher: RefUnwindSafe,
impl<P, Publisher> Send for ExternalServiceProxy<P, Publisher>where
Publisher: Send,
impl<P, Publisher> Sync for ExternalServiceProxy<P, Publisher>where
Publisher: Sync,
impl<P, Publisher> Unpin for ExternalServiceProxy<P, Publisher>
impl<P, Publisher> UnwindSafe for ExternalServiceProxy<P, Publisher>where
P: UnwindSafe,
Publisher: UnwindSafe,
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> IntoAny for T
impl<T> IntoAny for T
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 more