[][src]Trait libp2p_core::upgrade::OutboundUpgradeExt

pub trait OutboundUpgradeExt<C>: OutboundUpgrade<C> {
    pub fn map_outbound<F, T>(self, f: F) -> MapOutboundUpgrade<Self, F>
    where
        Self: Sized,
        F: FnOnce(Self::Output) -> T
, { ... }
pub fn map_outbound_err<F, T>(self, f: F) -> MapOutboundUpgradeErr<Self, F>
    where
        Self: Sized,
        F: FnOnce(Self::Error) -> T
, { ... } }

Extention trait for OutboundUpgrade. Automatically implemented on all types that implement OutboundUpgrade.

Provided methods

pub fn map_outbound<F, T>(self, f: F) -> MapOutboundUpgrade<Self, F> where
    Self: Sized,
    F: FnOnce(Self::Output) -> T, 
[src]

Returns a new object that wraps around Self and applies a closure to the Output.

pub fn map_outbound_err<F, T>(self, f: F) -> MapOutboundUpgradeErr<Self, F> where
    Self: Sized,
    F: FnOnce(Self::Error) -> T, 
[src]

Returns a new object that wraps around Self and applies a closure to the Error.

Loading content...

Implementors

impl<C, U: OutboundUpgrade<C>> OutboundUpgradeExt<C> for U[src]

Loading content...