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

Can't set endianess on C-like struct variant #66

Open
ckoehler opened this issue Jul 7, 2023 · 0 comments
Open

Can't set endianess on C-like struct variant #66

ckoehler opened this issue Jul 7, 2023 · 0 comments

Comments

@ckoehler
Copy link

ckoehler commented Jul 7, 2023

See below. Is that intended?

#[derive(Nom)]
#[nom(LittleEndian)] // this works
#[nom(Selector = "u8")]
pub enum Foo {
    #[nom(Selector = "0")]
    #[nom(BigEndian)] // this does nothing
    First {
        #[nom(BigEndian)] // this works
        the_field: u16,
        
        // more fields
    },
    // ... 
}
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