partway through fixes, macro system needs resdesign
Some checks failed
Rust / build (push) Has been cancelled

This commit is contained in:
2026-04-08 18:02:20 +02:00
parent 0909524dee
commit 9b4c7fa7d7
76 changed files with 1391 additions and 1065 deletions

View File

@@ -376,3 +376,13 @@ impl Encode for chrono::TimeDelta {
self.subsec_nanos().encode(write).await
}
}
impl Decode for chrono::DateTime<chrono::Utc> {
async fn decode<R: AsyncRead + ?Sized>(read: Pin<&mut R>) -> io::Result<Self> {
Ok(Self::from_timestamp_micros(i64::decode(read).await?).unwrap())
}
}
impl Encode for chrono::DateTime<chrono::Utc> {
async fn encode<W: AsyncWrite + ?Sized>(&self, write: Pin<&mut W>) -> io::Result<()> {
self.timestamp_micros().encode(write).await
}
}