quic_rpc::transport

Trait ServerEndpoint

Source
pub trait ServerEndpoint<In, Out>: ConnectionCommon<In, Out> {
    // Required methods
    fn accept(
        &self,
    ) -> impl Future<Output = Result<(Self::SendSink, Self::RecvStream), Self::OpenError>> + Send;
    fn local_addr(&self) -> &[LocalAddr];
}
Expand description

A server endpoint that listens for connections

A server endpoint can be used to accept bidirectional typed channels from any of the currently opened connections to clients, using ServerEndpoint::accept.

Required Methods§

Source

fn accept( &self, ) -> impl Future<Output = Result<(Self::SendSink, Self::RecvStream), Self::OpenError>> + Send

Accept a new typed bidirectional channel on any of the connections we have currently opened.

Source

fn local_addr(&self) -> &[LocalAddr]

The local addresses this endpoint is bound to.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A: ServerEndpoint<In, Out>, B: ServerEndpoint<In, Out>, In: RpcMessage, Out: RpcMessage> ServerEndpoint<In, Out> for CombinedServerEndpoint<A, B, In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> ServerEndpoint<In, Out> for ServerEndpoint<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> ServerEndpoint<In, Out> for FlumeServerEndpoint<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> ServerEndpoint<In, Out> for HyperServerEndpoint<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> ServerEndpoint<In, Out> for DummyServerEndpoint

Source§

impl<In: RpcMessage, Out: RpcMessage> ServerEndpoint<In, Out> for QuinnServerEndpoint<In, Out>