Skip to content
This repository has been archived by the owner on May 2, 2019. It is now read-only.

How to remove the type bound for the metric key? #18

Open
tobz opened this issue Jan 24, 2019 · 0 comments
Open

How to remove the type bound for the metric key? #18

tobz opened this issue Jan 24, 2019 · 0 comments

Comments

@tobz
Copy link
Contributor

tobz commented Jan 24, 2019

Right now we send around T everywhere and it pervades everything. If a user wanted to use an enum type for this, it looks OK type-wise, but things get ugly if you wanted to use normal strings, as you now have Receiver<&'static str>, etc.

We should see if there's something we can do with the sink interface to allow us to pass in arbitrary keys so long as they fit an interface, something along the lines of what PathBuf does with AsRef<_>. We can store strings under the hood just fine, but we want a generic way to get to that point that holders of Receiver<T> and Sink<T> don't need to care about.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant