Trait libp2p::core::upgrade::InboundUpgradeExt[][src]

pub trait InboundUpgradeExt<C>: InboundUpgrade<C> {
    pub fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F>
    where
        F: FnOnce(Self::Output) -> T
, { ... }
pub fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F>
    where
        F: FnOnce(Self::Error) -> T
, { ... } }

Extension trait for InboundUpgrade. Automatically implemented on all types that implement InboundUpgrade.

Provided methods

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

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

pub fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F> where
    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> InboundUpgradeExt<C> for U where
    U: InboundUpgrade<C>, 
[src]

Loading content...