pub struct TranscoderEndpoint<R, SendMsg>where
R: Transcoder,
SendMsg: Send + 'static,{ /* private fields */ }Expand description
Recv-only protocol transcoder endpoint.
Wraps an inner Endpoint<R::Input, SendMsg> and presents
Endpoint<R::Output, SendMsg>:
- recv (output direction): stateful stream transformation via
R: Transcoder— emits prologue, transcodes each item, then emits epilogue. - send (input direction): passes through to the inner endpoint unchanged.
Implementations§
Source§impl<R, SendMsg> TranscoderEndpoint<R, SendMsg>where
R: Transcoder + 'static,
SendMsg: Send + 'static,
impl<R, SendMsg> TranscoderEndpoint<R, SendMsg>where
R: Transcoder + 'static,
SendMsg: Send + 'static,
Trait Implementations§
Source§impl<R, SendMsg> Endpoint<<R as Transcoder>::Output, SendMsg> for TranscoderEndpoint<R, SendMsg>where
R: Transcoder + 'static,
SendMsg: Send + 'static,
impl<R, SendMsg> Endpoint<<R as Transcoder>::Output, SendMsg> for TranscoderEndpoint<R, SendMsg>where
R: Transcoder + 'static,
SendMsg: Send + 'static,
fn recv<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<R::Output>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
item: SendMsg,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<R, SendMsg> !Freeze for TranscoderEndpoint<R, SendMsg>
impl<R, SendMsg> !RefUnwindSafe for TranscoderEndpoint<R, SendMsg>
impl<R, SendMsg> Send for TranscoderEndpoint<R, SendMsg>
impl<R, SendMsg> Sync for TranscoderEndpoint<R, SendMsg>
impl<R, SendMsg> Unpin for TranscoderEndpoint<R, SendMsg>where
R: Unpin,
impl<R, SendMsg> !UnwindSafe for TranscoderEndpoint<R, SendMsg>
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