Closed daschl closed 6 years ago
@stefano-pogliani
For completeness I'll also implement FromStr
as well as Display
so its easier to convert from and to its textual representation
@stefano-pogliani fleshed out with errors and conversion traits.. its now pretty easy (see unit tests) how to convert and from, so it gives us lots of flexibility on how to use them
@stefano-pogliani which traits do you think we should implement as well? I found derive, and partialeq sufficient - but happy to add more!
That is a good question.
Personally I am not sure but the rust's lib team is suggesting all of these: Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Display, Default
.
Following the philosophy of "Who am I to dismiss the experience of the rust's lib team?" I'd say as many as possible?
The Default
trait does not make much sense here so I'd skip that but the rest should be derivable.
What do you think @daschl?
@stefano-pogliani added all the tags which I think make sense (also checked with for example std::Result which also implements those, so we can't be too way off here)
This changeset adds the tags and fields enums as they are currently represented in the java implementation.
Completes #7