why does `concrete_time` need to exist?
# development
h
why does
concrete_time
need to exist?
f
In rust, a duration is designed to hide its implementation details from you. Among other things, that means you can’t serialize it. concrete_time gives you a
Duration
that exposes its implementation details so it can be serialized.
concrete_time::Duration
implements
From
and
Into
for the standard duration so you’re encouraged to use that in most places and only use the concrete_time one if you need the serialization.
Also, it has a
TimeSpan
since that’s useful for us
The
TimeSpan
also gives you some convenience conversion functions like to the protobuf time representation as these are useful for us.