pystructtype.bitstype
BitsType: Base class for bitfield structs.
Classes
Base class for bitfield structs. Subclasses must define __bits_type__ and __bits_definition__. |
Module Contents
- class pystructtype.bitstype.BitsType[source]
Bases:
pystructtype.structdataclass.StructDataclassBase class for bitfield structs. Subclasses must define __bits_type__ and __bits_definition__.
- __bits_definition__: ClassVar[dict[str, int | list[int]] | collections.abc.Mapping[str, int | list[int]]][source]
- classmethod __init_subclass__(**kwargs: object) None[source]
Initialize subclass by setting up bitfield attributes and type annotations. Ensures __bits_type__ and __bits_definition__ are present, wraps definition in MappingProxyType, and sets up class-level fields and annotations for each bitfield.
- __post_init__() None[source]
Post-initialization to set up the _meta attribute from the class definition.