Skip to content

Allow bitfields for tuple structs with one value #74

@robamu

Description

@robamu

This might be a nice feature, because I have a lot of cases where I just want to constrain the bit range of an inner value, but the name/meaning does not change, so I do not really require a named field.

Example:

#[bitbybit::bitfield(u32)]
pub struct TransferSize(#[bits(0..=7, rw)] u8);

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