pub fn micros(instant: OffsetDateTime) -> i64Expand description
An instant in the unit the storage schema uses.
The single conversion into the storage encoding. Every layer that puts a timestamp into a row, a bind parameter or a predicate goes through this, so none of them can round or wrap differently from the others.
§Infallible, and what makes it so
time without the large-dates feature bounds OffsetDateTime at ±9999
years — ±3.2 × 10^17 microseconds, comfortably inside i64 — so every value
that can be constructed converts, and a Result here would be an error arm no
caller could produce and every caller would have to handle.
That is an assumption about a dependency’s feature set, and feature
unification means something else in the graph could enable large-dates
without a line changing here. It is therefore asserted rather than assumed:
the_storage_encoding_holds_every_representable_instant fails at this crate’s
boundary rather than as a wrapped timestamp inside a committed Parquet file.