pub enum IntoEitherHandler<L, R> {
Left(L),
Right(R),
}
Variants
Left(L)
Right(R)
Trait Implementations
sourceimpl<L, R> IntoConnectionHandler for IntoEitherHandler<L, R> where
L: IntoConnectionHandler,
R: IntoConnectionHandler,
impl<L, R> IntoConnectionHandler for IntoEitherHandler<L, R> where
L: IntoConnectionHandler,
R: IntoConnectionHandler,
Implementation of a IntoConnectionHandler
that represents either of two IntoConnectionHandler
implementations.
type Handler = Either<<L as IntoConnectionHandler>::Handler, <R as IntoConnectionHandler>::Handler>
type Handler = Either<<L as IntoConnectionHandler>::Handler, <R as IntoConnectionHandler>::Handler>
The protocols handler.
sourcefn into_handler(
self,
p: &PeerId,
c: &ConnectedPoint
) -> <IntoEitherHandler<L, R> as IntoConnectionHandler>::Handler
fn into_handler(
self,
p: &PeerId,
c: &ConnectedPoint
) -> <IntoEitherHandler<L, R> as IntoConnectionHandler>::Handler
Builds the protocols handler. Read more
sourcefn inbound_protocol(
&self
) -> <<IntoEitherHandler<L, R> as IntoConnectionHandler>::Handler as ConnectionHandler>::InboundProtocol
fn inbound_protocol(
&self
) -> <<IntoEitherHandler<L, R> as IntoConnectionHandler>::Handler as ConnectionHandler>::InboundProtocol
Return the handler’s inbound protocol.
sourcefn select<TProto2>(
self,
other: TProto2
) -> IntoConnectionHandlerSelect<Self, TProto2>
fn select<TProto2>(
self,
other: TProto2
) -> IntoConnectionHandlerSelect<Self, TProto2>
Builds an implementation of IntoConnectionHandler
that handles both this protocol and the
other one together. Read more
Auto Trait Implementations
impl<L, R> RefUnwindSafe for IntoEitherHandler<L, R> where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for IntoEitherHandler<L, R> where
L: Send,
R: Send,
impl<L, R> Sync for IntoEitherHandler<L, R> where
L: Sync,
R: Sync,
impl<L, R> Unpin for IntoEitherHandler<L, R> where
L: Unpin,
R: Unpin,
impl<L, R> UnwindSafe for IntoEitherHandler<L, R> where
L: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more