Enum packet_stream::IncomingPacket [] [src]

pub enum IncomingPacket<R: AsyncRead, W: AsyncWrite, B: AsRef<[u8]>> {
    Request(PeerRequest<W, B>),
    Duplex(PsSink<W, B>, PsStream<R>),
}

An incoming packet, initiated by the peer.

The enum variants carry values that allow interacting with the peer.

Variants

An incoming request. You get an PeerRequest, the peer got a Request and an Response.

A duplex connection initiated by the peer. Both peers get a PsSink and a PsStream.

Trait Implementations

Auto Trait Implementations

impl<R, W, B> !Send for IncomingPacket<R, W, B>

impl<R, W, B> !Sync for IncomingPacket<R, W, B>