Trait libp2p_core::upgrade::InboundUpgradeExt

source ยท
pub trait InboundUpgradeExt<C>: InboundUpgrade<C> {
    // Provided methods
    fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F>
       where Self: Sized,
             F: FnOnce(Self::Output) -> T { ... }
    fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F>
       where Self: Sized,
             F: FnOnce(Self::Error) -> T { ... }
}
๐Ÿ‘ŽDeprecated: Will be removed without replacement because it is not used within rust-libp2p.
Expand description

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

Provided Methodsยง

source

fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F>
where Self: Sized, F: FnOnce(Self::Output) -> T,

๐Ÿ‘ŽDeprecated: Will be removed without replacement because it is not used within rust-libp2p.

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

source

fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F>
where Self: Sized, F: FnOnce(Self::Error) -> T,

๐Ÿ‘ŽDeprecated: Will be removed without replacement because it is not used within rust-libp2p.

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

Implementorsยง