Struct quic_rpc::transport::combined::CombinedServerEndpoint
source · pub struct CombinedServerEndpoint<A, B, S: Service> {
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<S::Req, S::Res>, B: ServerEndpoint<S::Req, S::Res>, S: Service> CombinedServerEndpoint<A, B, S>
impl<A: ServerEndpoint<S::Req, S::Res>, B: ServerEndpoint<S::Req, S::Res>, S: Service> CombinedServerEndpoint<A, B, S>
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_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 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: ServerEndpoint<S::Req, S::Res>, B: ServerEndpoint<S::Req, S::Res>, S: Service> ConnectionCommon<<S as Service>::Req, <S as Service>::Res> for CombinedServerEndpoint<A, B, S>
impl<A: ServerEndpoint<S::Req, S::Res>, B: ServerEndpoint<S::Req, S::Res>, S: Service> ConnectionCommon<<S as Service>::Req, <S as Service>::Res> for CombinedServerEndpoint<A, B, S>
source§impl<A: ConnectionErrors, B: ConnectionErrors, S: Service> ConnectionErrors for CombinedServerEndpoint<A, B, S>
impl<A: ConnectionErrors, B: ConnectionErrors, S: Service> ConnectionErrors for CombinedServerEndpoint<A, B, S>
source§impl<A: ServerEndpoint<S::Req, S::Res>, B: ServerEndpoint<S::Req, S::Res>, S: Service> ServerEndpoint<<S as Service>::Req, <S as Service>::Res> for CombinedServerEndpoint<A, B, S>
impl<A: ServerEndpoint<S::Req, S::Res>, B: ServerEndpoint<S::Req, S::Res>, S: Service> ServerEndpoint<<S as Service>::Req, <S as Service>::Res> for CombinedServerEndpoint<A, B, S>
Auto Trait Implementations§
impl<A, B, S> Freeze for CombinedServerEndpoint<A, B, S>
impl<A, B, S> RefUnwindSafe for CombinedServerEndpoint<A, B, S>
impl<A, B, S> Send for CombinedServerEndpoint<A, B, S>
impl<A, B, S> Sync for CombinedServerEndpoint<A, B, S>
impl<A, B, S> Unpin for CombinedServerEndpoint<A, B, S>
impl<A, B, S> UnwindSafe for CombinedServerEndpoint<A, B, S>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)