Skip to main content

InboundStreamHandler

Trait InboundStreamHandler 

Source
pub trait InboundStreamHandler: ConnectionHandler {
    type InboundUpgrade: InboundUpgradeSend;
    type InboundUserData: Send + 'static;

    // Required methods
    fn listen_protocol(
        &self,
    ) -> SubstreamProtocol<Self::InboundUpgrade, Self::InboundUserData>;
    fn on_fully_negotiated(
        &mut self,
        user_data: Self::InboundUserData,
        protocol: <Self::InboundUpgrade as InboundUpgradeSend>::Output,
    );
    fn on_upgrade_error(
        &mut self,
        user_data: Self::InboundUserData,
        error: <Self::InboundUpgrade as InboundUpgradeSend>::Error,
    );
}

Required Associated Types§

Required Methods§

Source

fn listen_protocol( &self, ) -> SubstreamProtocol<Self::InboundUpgrade, Self::InboundUserData>

Source

fn on_fully_negotiated( &mut self, user_data: Self::InboundUserData, protocol: <Self::InboundUpgrade as InboundUpgradeSend>::Output, )

Source

fn on_upgrade_error( &mut self, user_data: Self::InboundUserData, error: <Self::InboundUpgrade as InboundUpgradeSend>::Error, )

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl InboundStreamHandler for DummyHandler

Source§

impl InboundStreamHandler for PendingConnectionHandler

Source§

impl<L, R> InboundStreamHandler for Either<L, R>

Source§

impl<THandler1, THandler2> InboundStreamHandler for ConnectionHandlerSelect<THandler1, THandler2>
where THandler1: InboundStreamHandler, THandler2: InboundStreamHandler,

Source§

impl<THandler, O, TMap> InboundStreamHandler for MapAction<THandler, O, TMap>
where THandler: InboundStreamHandler, O: Debug + Send + Clone + 'static, TMap: Send + 'static + Fn(O) -> Option<THandler::Action>,

Source§

impl<THandler, O, TMap> InboundStreamHandler for MapEvent<THandler, TMap>
where THandler: InboundStreamHandler, O: Debug + Send + Clone + 'static, TMap: Send + 'static + FnMut(THandler::Event) -> O,