Enum libp2p_core::connection::ConnectionHandlerEvent[][src]

pub enum ConnectionHandlerEvent<TOutboundOpenInfo, TCustom> {
    OutboundSubstreamRequest(TOutboundOpenInfo),
    Custom(TCustom),
}

Event produced by a handler.

Variants

OutboundSubstreamRequest(TOutboundOpenInfo)

Require a new outbound substream to be opened with the remote.

Custom(TCustom)

Other event.

Implementations

impl<TOutboundOpenInfo, TCustom> ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>[src]

Event produced by a handler.

pub fn map_outbound_open_info<F, I>(
    self,
    map: F
) -> ConnectionHandlerEvent<I, TCustom> where
    F: FnOnce(TOutboundOpenInfo) -> I, 
[src]

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, 
[src]

If this is Custom, maps the content to something else.

Trait Implementations

impl<TOutboundOpenInfo: Clone, TCustom: Clone> Clone for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>[src]

impl<TOutboundOpenInfo: Copy, TCustom: Copy> Copy for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>[src]

impl<TOutboundOpenInfo: Debug, TCustom: Debug> Debug for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>[src]

impl<TOutboundOpenInfo: Eq, TCustom: Eq> Eq for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>[src]

impl<TOutboundOpenInfo: PartialEq, TCustom: PartialEq> PartialEq<ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>> for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>[src]

impl<TOutboundOpenInfo, TCustom> StructuralEq for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>[src]

impl<TOutboundOpenInfo, TCustom> StructuralPartialEq for ConnectionHandlerEvent<TOutboundOpenInfo, TCustom>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]