Trait quic_rpc::transport::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_bi
].
Required Methods§
sourcefn accept(
&self,
) -> impl Future<Output = Result<(Self::SendSink, Self::RecvStream), Self::OpenError>> + Send
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.
sourcefn local_addr(&self) -> &[LocalAddr]
fn local_addr(&self) -> &[LocalAddr]
The local addresses this endpoint is bound to.
Object Safety§
This trait is not object safe.