rust-prometheus icon indicating copy to clipboard operation
rust-prometheus copied to clipboard

Use Generic Tuples to type labels

Open breezewish opened this issue 7 years ago • 2 comments
trafficstars

variable_labels can be expressed by generic tuples (variables in tuple length).

This brings several benifits:

  1. Runtime cost of checking the length of variable_labels can be eliminated.
  2. Label length can be checked in compile time.

breezewish avatar Jan 29 '18 10:01 breezewish

can you support this?

siddontang avatar Jan 29 '18 11:01 siddontang

@siddontang Ok. When I'm free I will handle this. By the way this will change interface signatures, which will be a breaking change.

breezewish avatar Jan 29 '18 13:01 breezewish