Skip to main content

Module codec

Module codec 

Source
Expand description

Codec traits for encoding and decoding remote messages.

This module provides the Encode and Decode traits along with implementations for primitive types, standard library containers, and acktor types.

Structs§

CodecTable
A table mapping the TypeId of messages to their corresponding codecs.
MessageCodec
A codec for a specific message type, containing the message id (MessageId::ID), an EncodeMsgFn for encoding the message to bytes, and a DecodeResFn for decoding the message response bytes back to the concrete message response type.

Enums§

DecodeError
Error type used by Decode.
EncodeError
Error type used by Encode.

Traits§

Codec
A codec table for encoding messages and decoding message responses.
Decode
Describes how to decode a message.
DecodeContext
Context for decoding messages.
Encode
Describes how to encode a message.
EncodeContext
Context for encoding messages.

Derive Macros§

Decodeipc
Derive the Decode trait for a message.
Encodeipc
Derive the Encode trait for a message.