[][src]Struct libp2p::simple::SimpleProtocol

pub struct SimpleProtocol<F> { /* fields omitted */ }

Implementation of ConnectionUpgrade. Convenient to use with small protocols.

Methods

impl<F> SimpleProtocol<F>
[src]

Builds a SimpleProtocol.

Trait Implementations

impl<F> Clone for SimpleProtocol<F>
[src]

Performs copy-assignment from source. Read more

impl<F: Debug> Debug for SimpleProtocol<F>
[src]

impl<C, F, O> InboundUpgrade<C> for SimpleProtocol<F> where
    C: AsyncRead + AsyncWrite,
    F: Fn(C) -> O,
    O: IntoFuture<Error = IoError>, 
[src]

Output after the upgrade has been successfully negotiated and the handshake performed.

Possible error during the handshake.

Future that performs the handshake with the remote.

impl<C, F, O> OutboundUpgrade<C> for SimpleProtocol<F> where
    C: AsyncRead + AsyncWrite,
    F: Fn(C) -> O,
    O: IntoFuture<Error = IoError>, 
[src]

Output after the upgrade has been successfully negotiated and the handshake performed.

Possible error during the handshake.

Future that performs the handshake with the remote.

impl<F> UpgradeInfo for SimpleProtocol<F>
[src]

Opaque type representing a negotiable protocol.

Iterator returned by protocol_info.

Auto Trait Implementations

impl<F> Send for SimpleProtocol<F> where
    F: Send + Sync

impl<F> Sync for SimpleProtocol<F> where
    F: Send + Sync

Blanket Implementations

impl<T> From for T
[src]

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Same for T

Should always be Self

impl<C, U> InboundUpgradeExt for U where
    U: InboundUpgrade<C>, 
[src]

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

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

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

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

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

impl<T> Erased for T

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.