pub struct CombinedServerEndpoint<A, B, In, Out> {
pub a: Option<A>,
pub b: Option<B>,
/* private fields */
}
Expand description
An endpoint that combines two other endpoints
Fields§
§a: Option<A>
First endpoint
b: Option<B>
Second endpoint
Implementations§
Source§impl<A: ServerEndpoint<In, Out>, B: ServerEndpoint<In, Out>, In: RpcMessage, Out: RpcMessage> CombinedServerEndpoint<A, B, In, Out>
impl<A: ServerEndpoint<In, Out>, B: ServerEndpoint<In, Out>, In: RpcMessage, Out: RpcMessage> CombinedServerEndpoint<A, B, In, Out>
Sourcepub fn new(a: Option<A>, b: Option<B>) -> Self
pub fn new(a: Option<A>, b: Option<B>) -> Self
Create a combined server endpoint from two other server endpoints
When listening for incoming connections with crate::ServerEndpoint::accept, 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 not throw an error but wait forever.
Sourcepub fn into_inner(self) -> (Option<A>, Option<B>)
pub fn into_inner(self) -> (Option<A>, Option<B>)
Get back the inner endpoints
Trait Implementations§
Source§impl<A: Clone, B: Clone, In: RpcMessage, Out: RpcMessage> Clone for CombinedServerEndpoint<A, B, In, Out>
impl<A: Clone, B: Clone, In: RpcMessage, Out: RpcMessage> Clone for CombinedServerEndpoint<A, B, In, Out>
Source§impl<A: ServerEndpoint<In, Out>, B: ServerEndpoint<In, Out>, In: RpcMessage, Out: RpcMessage> ConnectionCommon<In, Out> for CombinedServerEndpoint<A, B, In, Out>
impl<A: ServerEndpoint<In, Out>, B: ServerEndpoint<In, Out>, In: RpcMessage, Out: RpcMessage> ConnectionCommon<In, Out> for CombinedServerEndpoint<A, B, In, Out>
Source§type RecvStream = RecvStream<A, B, In, Out>
type RecvStream = RecvStream<A, B, In, Out>
Receive side of a bidirectional typed channel
Source§impl<A: ConnectionErrors, B: ConnectionErrors, In: RpcMessage, Out: RpcMessage> ConnectionErrors for CombinedServerEndpoint<A, B, In, Out>
impl<A: ConnectionErrors, B: ConnectionErrors, In: RpcMessage, Out: RpcMessage> ConnectionErrors for CombinedServerEndpoint<A, B, In, Out>
Source§impl<A: Debug, B: Debug, In: RpcMessage, Out: RpcMessage> Debug for CombinedServerEndpoint<A, B, In, Out>
impl<A: Debug, B: Debug, In: RpcMessage, Out: RpcMessage> Debug for CombinedServerEndpoint<A, B, In, Out>
Source§impl<A: ServerEndpoint<In, Out>, B: ServerEndpoint<In, Out>, In: RpcMessage, Out: RpcMessage> ServerEndpoint<In, Out> for CombinedServerEndpoint<A, B, In, Out>
impl<A: ServerEndpoint<In, Out>, B: ServerEndpoint<In, Out>, In: RpcMessage, Out: RpcMessage> ServerEndpoint<In, Out> for CombinedServerEndpoint<A, B, In, Out>
Auto Trait Implementations§
impl<A, B, In, Out> Freeze for CombinedServerEndpoint<A, B, In, Out>
impl<A, B, In, Out> RefUnwindSafe for CombinedServerEndpoint<A, B, In, Out>
impl<A, B, In, Out> Send for CombinedServerEndpoint<A, B, In, Out>
impl<A, B, In, Out> Sync for CombinedServerEndpoint<A, B, In, Out>
impl<A, B, In, Out> Unpin for CombinedServerEndpoint<A, B, In, Out>
impl<A, B, In, Out> UnwindSafe for CombinedServerEndpoint<A, B, In, Out>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)