Tags: GTimothy/linux
Tags
bitflag_options-macrorules_v1: macro_rules impl of bitflag_options-v1 - generates same code as bitflag_options-v1 but implemented via macro_rules. - slightly different call syntax due to macro_rules syntax constraints (notably: colon after Ident are not allowed)
bitflag-v3: simplification, fixes, improvements - simpl.: remove ConstrainedFlag wrapper. Merged its `bits` method in the Bitflag trait. - fix: fix parsing of macro to properly handle path expression as values - improvement: added try_punct to be able to handle punct like other try_ methods for macros - improvement: documented some macro functions - improvements: added hrtimer_mode example
bitflag-v2: factorisation and new bitflag module This version the following changes were made: - creation of a bitflag module where Valid<Part> and Missing<Part> were moved and shared instead of being reimplemented by the macro every time - new BitFlag trait to characterise the bit type of a flag - new generic ConstrainedFlag<T:BitFlag>(T::bits) wrapper to replace the custom wrapper previously implemented by the macro. Now this custom type is a unit-like struct used to specify the ConstrainedFlag. This will allow shared trait implementations for multiple flags sharing bits types. - moved the builder() method to ConstrainedFlag - made the builder's build() method part of a documented trait in the module to publicise the common interface of all builders.
First draft of bitflag macro. For a set of flags with combination constraints, this macro allows to generate a Rust wrapper and its builder.
bitflag_options-v1: first draft of bitflag_options macro. Define a fs::OpenOption-like named wrapper with a set of options as bool functions wich set different user defined bitflags depending on the bool value.