Module timestamp_utils

Source
Expand description

Provides utility functions for working with Firestore timestamps.

This module includes helpers for converting between chrono::DateTime<Utc> and Google’s Timestamp protobuf type, often used with #[serde(with)] attributes for automatic conversion.

Functions§

from_duration
Converts a Google prost_types::Duration to a chrono::Duration.
from_timestamp
Converts a Google prost_types::Timestamp to a chrono::DateTime<Utc>.
to_timestamp
Converts a chrono::DateTime<Utc> to a Google prost_types::Timestamp.