[][src]Enum libp2p::core::nodes::handled_node::NodeHandlerEvent

pub enum NodeHandlerEvent<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.

Methods

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

Event produced by a handler.

pub fn map_outbound_open_info<F, I>(
    self,
    map: F
) -> NodeHandlerEvent<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) -> NodeHandlerEvent<TOutboundOpenInfo, I> where
    F: FnOnce(TCustom) -> I, 
[src]

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

Trait Implementations

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

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

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

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

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

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

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

Auto Trait Implementations

impl<TOutboundOpenInfo, TCustom> RefUnwindSafe for NodeHandlerEvent<TOutboundOpenInfo, TCustom> where
    TCustom: RefUnwindSafe,
    TOutboundOpenInfo: RefUnwindSafe

impl<TOutboundOpenInfo, TCustom> Send for NodeHandlerEvent<TOutboundOpenInfo, TCustom> where
    TCustom: Send,
    TOutboundOpenInfo: Send

impl<TOutboundOpenInfo, TCustom> Sync for NodeHandlerEvent<TOutboundOpenInfo, TCustom> where
    TCustom: Sync,
    TOutboundOpenInfo: Sync

impl<TOutboundOpenInfo, TCustom> Unpin for NodeHandlerEvent<TOutboundOpenInfo, TCustom> where
    TCustom: Unpin,
    TOutboundOpenInfo: Unpin

impl<TOutboundOpenInfo, TCustom> UnwindSafe for NodeHandlerEvent<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

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>,