Crate common_macro

source Β·

Modules§

Attribute Macros§

  • Attribute macro to convert a normal function to SQL administration function. The annotated function should accept:
  • A struct can be used as a creator for aggregate function if it has been annotated with this attribute first. This attribute add a necessary field which is intended to store the input data’s types to the struct. This attribute is expected to be used along with derive macro AggrFuncTypeStore.
  • Attribute macro to print the caller to the annotated function. The caller is printed as its filename and the call site line number.
  • Attribute macro to convert an arithimetic function to a range function. The annotated function should accept servaral arrays as input and return a single value as output. This procedure macro can works on any number of input parameters. Return type can be either primitive type or wrapped in Option.
  • Attribute macro to derive std::fmt::Debug for the annotated Error type.

Derive Macros§