Crate muxrpc [] [src]

Implements the muxrpc protocol in rust.

All futures, sinks and streams with an error type of Option<io::Error> use None to signal that an error happend on the underlying transport, but on another handle to the transport.

Structs

Async

An outgoing async request, created by this muxrpc.

AsyncResponse

A response to an async that will be received from the peer.

CancelSource

This future can be used to signal to the peer that you are no longer interested in receiving more values from this source.

CloseRpc

A future for closing the muxrpc session. If there are still active handles to the underlying transport, it is not closed immediately. It will get closed once the last of them is done.

Done

A future that emits the wrapped writer of a muxrpc connection once the outgoing half of the has been fully closed.

Duplex

An outgoing duplex request, created by this muxrpc.

MuxSink

An outgoing sink request, created by this muxrpc.

PeerAsync

An async initiated by the peer. Drop to ignore it, or use respond or respond_err to send a response.

PeerAsyncResponse

Future that completes when the async response has been sent to the peer.

PeerSync

An sync initiated by the peer. Drop to ignore it, or use respond or respond_err to send a response.

PeerSyncResponse

Future that completes when the sync response has been sent to the peer.

RpcIn

A stream of incoming rpcs from the peer.

RpcOut

Allows sending rpcs to the peer.

RpcSink

A sink to the peer.

RpcStream

A stream from the peer.

Source

An outgoing source request, created by this muxrpc.

SourceCancelable

An outgoing source request, created by this muxrpc.

Sync

An outgoing sync request, created by this muxrpc.

SyncResponse

A response to an sync that will be received from the peer.

Enums

ConnectionRpcError

An error that can be emitted during the rpc process when receiving multiplexed data.

IncomingRpc

An incoming packet, initiated by the peer.

RpcError

An error that can be emitted during the rpc process.

Traits

Rpc

Implementors of this trait are rpcs that can be sent to the peer. The serilize implementation should provide the argument value(s).

Functions

muxrpc

Take ownership of an AsyncRead and an AsyncWrite to create the two halves of a muxrpc connection.