multiformats / rust-multiaddr

multiaddr implementation in rust
https://crates.io/crates/multiaddr
Other
86 stars 45 forks source link

Use trait object #11

Closed Ericson2314 closed 3 years ago

Ericson2314 commented 8 years ago

I believe all the multiformats are meant to be extensible, so a Multiaddr trait object is probably more appropriate than a closed enum.

dignifiedquire commented 8 years ago

Thank you for the note. I was/am still very much learning Rust so excuse any oversights please :)

It makes sense to make allow them to be extensible, I just haven't had a use case for it yet. I am not sure when I will get to fixing this, so PRs are very welcome :)

Ericson2314 commented 8 years ago

I'll take a look at making a PR :).

mxinden commented 3 years ago

I am closing here since the discussion has stalled. Off the top of my head I don't see a reason for Multiaddr to be a trait, but I will gladly be proven wrong, thus please comment in case you would like to continue the discussion.