Open Antiarchitect opened 1 year ago
Assume I have:
struct A { a: String, b: String }
Can I effectively construct a method:
impl A { pub fn prometheus_label_values(&self) -> &[&str] { &[ self.a.as_str(), self.b.as_str() ] } }
To return arguments for with_label_values? It seems &[&str] argument type is too restrictive. Even declaring the lifetimes does not help.
with_label_values
&[&str]
Assume I have:
Can I effectively construct a method:
To return arguments for
with_label_values
? It seems&[&str]
argument type is too restrictive. Even declaring the lifetimes does not help.