use chrono::{DateTime, Utc}; use std::ops::{Deref, DerefMut}; include!("gen/mod.rs"); //region ProtoTimestamp pub struct ProtoTimestamp(pbjson_types::Timestamp); impl Into for ProtoTimestamp { fn into(self) -> pbjson_types::Timestamp { self.0 } } impl From> for ProtoTimestamp { fn from(dt: DateTime) -> Self { ProtoTimestamp(dt.into()) } } impl Deref for ProtoTimestamp { type Target = pbjson_types::Timestamp; fn deref(&self) -> &Self::Target { &self.0 } } impl DerefMut for ProtoTimestamp { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } //endregion