Skip to content

Variant encoding/decoding policy. #32

@3Hren

Description

@3Hren

MessagePack has no specification about how to encode variant types. Thus we are free to do whatever we want.

Every Rust variant value can be represented as a tuple of index and a value, and we encode/decode them this way by default, but the given chose may be not ideal for you.

The first solution I've imaging is to introduce enum policies as a template parameter attached to Encoder and Decoder with default value of course.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions