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

Using short or long for with attribute #[endian = "..."] #2

Open
xoac opened this issue Jan 22, 2020 · 0 comments
Open

Using short or long for with attribute #[endian = "..."] #2

xoac opened this issue Jan 22, 2020 · 0 comments

Comments

@xoac
Copy link
Owner

xoac commented Jan 22, 2020

When working with MixedEndian(Des)/(S)erializer is possible to use types that doesn't implement this trait for field. You just need to add #[endian] attribute. This is just to decide use a long or short form.

#[derive(EndianSize, MixedEndianSerialize)]
struct A {
  #[endian = "little"]
  a: i32,
  #[endian = "le"]
  b: i32,
}

I feel better with long form.

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