|
parcel 0.2.2
Wrappable, wire-transferable C++23 value system with JSON serialization
|
Cell adapters for std::chrono types.
More...
#include <parcel/cell.h>#include <parcel/defaults.h>#include <parcel/descriptor.h>#include <parcel/json.h>#include <charconv>#include <chrono>#include <memory>#include <string>#include <string_view>

Go to the source code of this file.
Classes | |
| class | parcel::SystemTimePointCell |
| Wall-clock time at second resolution (ISO-8601-friendly). More... | |
| class | parcel::UnixMillisCell |
| Wall-clock time at millisecond resolution. More... | |
| class | parcel::DurationMsCell |
| Duration in milliseconds. More... | |
| class | parcel::YmdCell |
| Calendar date (no time of day). More... | |
Typedefs | |
| using | parcel::TimestampMsCell = UnixMillisCell |
Wire-shape alias of UnixMillisCell for code that thinks in ms. | |
Cell adapters for std::chrono types.
Adds three cells for the most common time payloads:
UnixMillisCell — sys_time<milliseconds>, wire is i64 ms epoch.DurationMsCell — std::chrono::milliseconds, wire is i64.YmdCell — std::chrono::year_month_day, wire is ISO "YYYY-MM-DD".SystemTimePointCell— sys_seconds, wire is i64 epoch seconds.TimestampMsCell is exposed as an alias of UnixMillisCell for callers who prefer a wire-shape name. The recommended default for cross-language timestamps is UnixMillisCell (matches JavaScript Date.now() and Java Instant.toEpochMilli()).