3Hren / msgpack-rust

MessagePack implementation for Rust / msgpack.org[Rust]
MIT License
1.14k stars 130 forks source link

Adding Timestamp decode/encode #351

Open junderw opened 1 month ago

junderw commented 1 month ago

This is a baseline just to have something to work off of, very WIP.

  1. Should we perhaps just use DateTime from the chrono crate under a feature flag instead of creating a simple enum. (I've decided against this, it's too much of a hassle.)
  2. How should we go about including it in rmp-serde if at all?
  3. Checking for invalid values (ie. nanos above 999_999_999) should probably be done better. I am not too familiar with this library and how I should be propagating such errors.
  4. Also, please advise on any formatting requests. (I turned off rustfmt)

Let me know if this isn't something you're interested it.