pub struct Handler<TCodec>where
TCodec: Codec,{ /* private fields */ }Implementations§
Trait Implementations§
Source§impl<TCodec> ConnectionHandler for Handler<TCodec>
impl<TCodec> ConnectionHandler for Handler<TCodec>
type Action = OutboundRequest<TCodec>
type Event = Event<TCodec>
fn handle_action(&mut self, action: Self::Action)
fn poll_close(&mut self, _: &mut Context<'_>) -> Poll<Option<Self::Event>>
fn poll( &mut self, cx: &mut Context<'_>, ) -> Poll<ConnectionHandlerEvent<Self::Event>>
fn connection_keep_alive(&self) -> bool
fn select<H>(self, other: H) -> ConnectionHandlerSelect<Self, H>where
H: ConnectionHandler,
Self: Sized,
fn map_event<O, F>(self, map: F) -> MapEvent<Self, F>
fn map_action<O, F>(self, map: F) -> MapAction<Self, O, F>
Source§impl<TCodec> OutboundStreamHandler for Handler<TCodec>
impl<TCodec> OutboundStreamHandler for Handler<TCodec>
type OutboundUpgrade = Upgrade<<TCodec as Codec>::Protocol>
type OutboundUserData = ()
fn on_fully_negotiated( &mut self, _user_data: Self::OutboundUserData, (stream, protocol): <Self::OutboundUpgrade as OutboundUpgradeSend>::Output, )
fn on_upgrade_error( &mut self, _user_data: Self::OutboundUserData, error: StreamUpgradeError<<Self::OutboundUpgrade as OutboundUpgradeSend>::Error>, )
fn poll_outbound_request( &mut self, _cx: &mut Context<'_>, ) -> Poll<SubstreamProtocol<Self::OutboundUpgrade, Self::OutboundUserData>>
Auto Trait Implementations§
impl<TCodec> !Freeze for Handler<TCodec>
impl<TCodec> !RefUnwindSafe for Handler<TCodec>
impl<TCodec> Send for Handler<TCodec>where
TCodec: Send,
impl<TCodec> !Sync for Handler<TCodec>
impl<TCodec> Unpin for Handler<TCodec>
impl<TCodec> !UnwindSafe for Handler<TCodec>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more