From 9e171096a72d3e63626df7b09970476aba28eb06 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 8 Oct 2024 22:43:22 -0400 Subject: Use a two-tier hierarchy for events. This will make it much easier to slot in new event types (login events!). --- src/event/sequence.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/event/sequence.rs') diff --git a/src/event/sequence.rs b/src/event/sequence.rs index ceb5bcb..bf6d5b8 100644 --- a/src/event/sequence.rs +++ b/src/event/sequence.rs @@ -72,6 +72,10 @@ impl Sequence { pub trait Sequenced { fn instant(&self) -> Instant; + fn at(&self) -> DateTime { + self.instant().at + } + fn sequence(&self) -> Sequence { self.instant().into() } -- cgit v1.2.3