pub struct DuplexTx<M: RemoteMessage> { /* private fields */ }Expand description
Sender half of a duplex channel.
Trait Implementations§
Source§impl<M: RemoteMessage> Clone for DuplexTx<M>
impl<M: RemoteMessage> Clone for DuplexTx<M>
Source§impl<M: RemoteMessage> Debug for DuplexTx<M>
impl<M: RemoteMessage> Debug for DuplexTx<M>
Source§impl<M: RemoteMessage> Tx<M> for DuplexTx<M>
impl<M: RemoteMessage> Tx<M> for DuplexTx<M>
Source§fn do_post(&self, message: M, completion: CompletionSink<M>)
fn do_post(&self, message: M, completion: CompletionSink<M>)
Post a message and report its terminal outcome to
completion. Read moreSource§fn addr(&self) -> ChannelAddr
fn addr(&self) -> ChannelAddr
The channel address to which this Tx is sending.
Source§fn try_post(&self, message: M) -> CompletionReceipt<M> ⓘ
fn try_post(&self, message: M) -> CompletionReceipt<M> ⓘ
Enqueue a
message on the local end of the channel and return a receipt
that resolves when the message is accepted or rejected.Source§fn send<'life0, 'async_trait>(
&'life0 self,
message: M,
) -> Pin<Box<dyn Future<Output = Result<(), SendError<M>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
message: M,
) -> Pin<Box<dyn Future<Output = Result<(), SendError<M>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Send a message synchronously, returning when the message has
been delivered to the remote end of the channel.
Auto Trait Implementations§
impl<M> Freeze for DuplexTx<M>
impl<M> !RefUnwindSafe for DuplexTx<M>
impl<M> Send for DuplexTx<M>
impl<M> Sync for DuplexTx<M>
impl<M> Unpin for DuplexTx<M>
impl<M> UnsafeUnpin for DuplexTx<M>
impl<M> !UnwindSafe for DuplexTx<M>
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,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].