Skip to content

Unclear how to impl Deserializer::deserialize_struct for formats that are not self-describing #2914

Open
@lolbinarycat

Description

@lolbinarycat

Imagine a simple binary format that only handles integers and structs with integers in them. It deserializes based on field order and does not care about names. how does such a format handle deserialize_struct?

postcard uses visit_seq, but there's no indication from the docs that such an operation is guaranteed to work, what if the struct has a manually implemented Visitor and they didn't know to implement visit_seq?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions