Struct quic_rpc::transport::combined::ServerChannel
source · pub struct ServerChannel<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> { /* private fields */ }
Expand description
A channel that combines two other channels
Implementations§
source§impl<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> ServerChannel<A, B, In, Out>
impl<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> ServerChannel<A, B, In, Out>
sourcepub fn new(
a: Option<A::ServerChannel<In, Out>>,
b: Option<B::ServerChannel<In, Out>>
) -> Self
pub fn new(
a: Option<A::ServerChannel<In, Out>>,
b: Option<B::ServerChannel<In, Out>>
) -> Self
Create a combined channel from two other channels
When opening a channel with crate::ClientChannel::open_bi
, the first configured channel will be used,
and no attempt will be made to use the second channel in case of failure. If no channels are
configred, open_bi will immediately fail with OpenBiError::NoChannel
.
When listening for incoming channels with crate::ServerChannel::accept_bi
, all configured channels will
be listened on, and the first to receive a connection will be used. If no channels are
configured, accept_bi will wait forever.
Trait Implementations§
source§impl<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> Clone for ServerChannel<A, B, In, Out>
impl<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> Clone for ServerChannel<A, B, In, Out>
source§impl<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> Debug for ServerChannel<A, B, In, Out>
impl<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> Debug for ServerChannel<A, B, In, Out>
source§impl<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> ServerChannel<In, Out, ChannelTypes<A, B>> for ServerChannel<A, B, In, Out>
impl<A: CT, B: CT, In: RpcMessage, Out: RpcMessage> ServerChannel<In, Out, ChannelTypes<A, B>> for ServerChannel<A, B, In, Out>
source§fn local_addr(&self) -> &[LocalAddr]
fn local_addr(&self) -> &[LocalAddr]
The local addresses this server is bound to. Read more
source§fn accept_bi(&self) -> AcceptBiFuture<'_, A, B, In, Out>
fn accept_bi(&self) -> AcceptBiFuture<'_, A, B, In, Out>
Accept a bidirectional stream