Enum libp2p_core::connection::ConnectionHandlerEvent [−][src]
pub enum ConnectionHandlerEvent<TOutboundOpenInfo, TCustom> { OutboundSubstreamRequest(TOutboundOpenInfo), Custom(TCustom), }
Expand description
Event produced by a handler.
Variants
Require a new outbound substream to be opened with the remote.
Other event.
Implementations
Event produced by a handler.
pub fn map_outbound_open_info<F, I>(
self,
map: F
) -> ConnectionHandlerEvent<I, TCustom> where
F: FnOnce(TOutboundOpenInfo) -> I,
pub fn map_outbound_open_info<F, I>(
self,
map: F
) -> ConnectionHandlerEvent<I, TCustom> where
F: FnOnce(TOutboundOpenInfo) -> I,
If this is OutboundSubstreamRequest
, maps the content to something else.
pub fn map_custom<F, I>(
self,
map: F
) -> ConnectionHandlerEvent<TOutboundOpenInfo, I> where
F: FnOnce(TCustom) -> I,
pub fn map_custom<F, I>(
self,
map: F
) -> ConnectionHandlerEvent<TOutboundOpenInfo, I> where
F: FnOnce(TCustom) -> I,
If this is Custom
, maps the content to something else.
Trait Implementations
impl<TOutboundOpenInfo: Clone, TCustom: Clone> Clone for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
impl<TOutboundOpenInfo: Clone, TCustom: Clone> Clone for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
impl<TOutboundOpenInfo: Debug, TCustom: Debug> Debug for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
impl<TOutboundOpenInfo: Debug, TCustom: Debug> Debug for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
impl<TOutboundOpenInfo: PartialEq, TCustom: PartialEq> PartialEq<ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>> for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
impl<TOutboundOpenInfo: PartialEq, TCustom: PartialEq> PartialEq<ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>> for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<TOutboundOpenInfo: Copy, TCustom: Copy> Copy for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
impl<TOutboundOpenInfo: Eq, TCustom: Eq> Eq for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
impl<TOutboundOpenInfo, TCustom> StructuralEq for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
impl<TOutboundOpenInfo, TCustom> StructuralPartialEq for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>
Auto Trait Implementations
impl<TOutboundOpenInfo, TCustom> RefUnwindSafe for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom> where
TCustom: RefUnwindSafe,
TOutboundOpenInfo: RefUnwindSafe,
impl<TOutboundOpenInfo, TCustom> Send for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom> where
TCustom: Send,
TOutboundOpenInfo: Send,
impl<TOutboundOpenInfo, TCustom> Sync for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom> where
TCustom: Sync,
TOutboundOpenInfo: Sync,
impl<TOutboundOpenInfo, TCustom> Unpin for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom> where
TCustom: Unpin,
TOutboundOpenInfo: Unpin,
impl<TOutboundOpenInfo, TCustom> UnwindSafe for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom> where
TCustom: UnwindSafe,
TOutboundOpenInfo: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V