Crate packet_stream_codec [] [src]

Implements the packet-stream-codec used by muxrpc in rust.

Structs

CodecSink

This sink consumes pairs of Metadata and AsRef<[u8]>s of type B and encodes them into the wrapped AsyncWrite of type W.

CodecStream

This stream decodes pairs of data and metadata from the wrapped AsyncRead of type R.

Metadata

The metadata of a packet.

Statics

END

Bitmask for the end flag.

STREAM

Bitmask for the stream flag.

TYPE

Bitmask for the type flags.

TYPE_BINARY

Value of the binary type.

TYPE_JSON

Value of the json type.

TYPE_STRING

Value of the string type.

Type Definitions

PacketId

The ids used by packet-stream packets