Skip to content

Add Support for Enum Struct Variants #21

@mitsuhiko

Description

@mitsuhiko

Similar to serde it should be possible to serializer and deserialize enums with structs in them. There are two cases to cover:

Newtype pattern:

struct A {
  a: bool
}

struct B {
  b: bool
}

enum Foo {
  A(A),
  B(B),
}

Embedded struct variant pattern:

enum Foo {
  A { a: bool },
  B { b: bool },
}

Either of them should likely work the same. This issue relates to the question of buffering and state (#20).

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign considerations

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions