Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow custom marschallers #25

Open
JAicewizard opened this issue Apr 13, 2019 · 0 comments
Open

allow custom marschallers #25

JAicewizard opened this issue Apr 13, 2019 · 0 comments

Comments

@JAicewizard
Copy link

JAicewizard commented Apr 13, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant