[−][src]Enum libp2p_core::protocols_handler::ProtocolsHandlerEvent
Event produced by a handler.
Variants
OutboundSubstreamRequestRequest a new outbound substream to be opened with the remote.
Fields of OutboundSubstreamRequest
ShutdownPerform a graceful shutdown of the connection to the remote.
Should be returned after shutdown() has been called.
Custom(TCustom)Other event.
Methods
impl<TConnectionUpgrade, TOutboundOpenInfo, TCustom> ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>[src]
Event produced by a handler.
pub fn map_outbound_open_info<F, I>(
self,
map: F
) -> ProtocolsHandlerEvent<TConnectionUpgrade, I, TCustom> where
F: FnOnce(TOutboundOpenInfo) -> I, [src]
self,
map: F
) -> ProtocolsHandlerEvent<TConnectionUpgrade, I, TCustom> where
F: FnOnce(TOutboundOpenInfo) -> I,
If this is an OutboundSubstreamRequest, maps the info member from a TOutboundOpenInfo to something else.
pub fn map_protocol<F, I>(
self,
map: F
) -> ProtocolsHandlerEvent<I, TOutboundOpenInfo, TCustom> where
F: FnOnce(TConnectionUpgrade) -> I, [src]
self,
map: F
) -> ProtocolsHandlerEvent<I, TOutboundOpenInfo, TCustom> where
F: FnOnce(TConnectionUpgrade) -> I,
If this is an OutboundSubstreamRequest, maps the protocol (TConnectionUpgrade) to something else.
pub fn map_custom<F, I>(
self,
map: F
) -> ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, I> where
F: FnOnce(TCustom) -> I, [src]
self,
map: F
) -> ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, I> where
F: FnOnce(TCustom) -> I,
If this is a Custom event, maps the content to something else.
Trait Implementations
impl<TConnectionUpgrade: Eq, TOutboundOpenInfo: Eq, TCustom: Eq> Eq for ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>[src]
impl<TConnectionUpgrade: Clone, TOutboundOpenInfo: Clone, TCustom: Clone> Clone for ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>[src]
fn clone(
&self
) -> ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>[src]
&self
) -> ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<TConnectionUpgrade: Copy, TOutboundOpenInfo: Copy, TCustom: Copy> Copy for ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>[src]
impl<TConnectionUpgrade: PartialEq, TOutboundOpenInfo: PartialEq, TCustom: PartialEq> PartialEq<ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>> for ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>[src]
fn eq(
&self,
other: &ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>
) -> bool[src]
&self,
other: &ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>
) -> bool
fn ne(
&self,
other: &ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>
) -> bool[src]
&self,
other: &ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>
) -> bool
impl<TConnectionUpgrade: Debug, TOutboundOpenInfo: Debug, TCustom: Debug> Debug for ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom>[src]
Auto Trait Implementations
impl<TConnectionUpgrade, TOutboundOpenInfo, TCustom> Send for ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom> where
TConnectionUpgrade: Send,
TCustom: Send,
TOutboundOpenInfo: Send,
TConnectionUpgrade: Send,
TCustom: Send,
TOutboundOpenInfo: Send,
impl<TConnectionUpgrade, TOutboundOpenInfo, TCustom> Sync for ProtocolsHandlerEvent<TConnectionUpgrade, TOutboundOpenInfo, TCustom> where
TConnectionUpgrade: Sync,
TCustom: Sync,
TOutboundOpenInfo: Sync,
TConnectionUpgrade: Sync,
TCustom: Sync,
TOutboundOpenInfo: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Same for T
type Output = T
Should always be Self