Trait wrpc_transport::frame::Accept

source ·
pub trait Accept {
    type Context: Send + Sync + 'static;
    type Outgoing: AsyncWrite + Send + Sync + Unpin + 'static;
    type Incoming: AsyncRead + Send + Sync + Unpin + 'static;

    // Required method
    fn accept(
        &self,
    ) -> impl Future<Output = Result<(Self::Context, Self::Outgoing, Self::Incoming)>>;
}
Expand description

Accepts connections on a transport

Required Associated Types§

source

type Context: Send + Sync + 'static

Transport-specific invocation context

source

type Outgoing: AsyncWrite + Send + Sync + Unpin + 'static

Outgoing byte stream

source

type Incoming: AsyncRead + Send + Sync + Unpin + 'static

Incoming byte stream

Required Methods§

source

fn accept( &self, ) -> impl Future<Output = Result<(Self::Context, Self::Outgoing, Self::Incoming)>>

Accept a connection returning a pair of streams and connection context

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, U, F> Accept for &AcceptMapContext<T, F>
where T: Accept, U: Send + Sync + 'static, F: Fn(T::Context) -> U,

source§

impl<T, U, F> Accept for AcceptMapContext<T, F>
where T: Accept, U: Send + Sync + 'static, F: Fn(T::Context) -> U,