Skip to content

allow custom marschallers #25

@JAicewizard

Description

@JAicewizard

Allow for custom types that are able to marschall themselves.

For example, the following should assume that the type Data in package A has the Size, Marschall and Unmarschall functions and use those to generate code.

struct Person {
  Name string
  Age A.Data //sizeMarschal
}

It might not be practical for every struct to have a .Size method(for whatever reason) so the following should get the bytes and prefix the length itself.

struct Person {
  Name string
  Age A.Data //Marschal
}

EDIT: when only the Marschal type is specifiend dont generate a size Method, or only support the sizeMarschal type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions