pub struct EventRepository<'a> { /* private fields */ }Implementations§
Source§impl<'a> EventRepository<'a>
impl<'a> EventRepository<'a>
pub const fn new(conn: &'a Connection) -> Self
pub fn get(&self, event_id: Uuid) -> Result<Option<ChangeEvent>>
pub fn enqueue_delivery( &self, event_id: Uuid, subscription_id: Uuid, ) -> Result<()>
Sourcepub fn claim_due(
&self,
now: i64,
duration_us: i64,
) -> Result<Option<EventDelivery>>
pub fn claim_due( &self, now: i64, duration_us: i64, ) -> Result<Option<EventDelivery>>
At most one active delivery per subscription, including claims made by other processes. Expired tokens are superseded by a strictly newer epoch.
pub fn complete(&self, delivery: &EventDelivery, now: i64) -> Result<bool>
pub fn retry( &self, delivery: &EventDelivery, now: i64, next_attempt_us: i64, error: &str, dead: bool, ) -> Result<bool>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EventRepository<'a>
impl<'a> !Send for EventRepository<'a>
impl<'a> !Sync for EventRepository<'a>
impl<'a> !UnwindSafe for EventRepository<'a>
impl<'a> Freeze for EventRepository<'a>
impl<'a> Unpin for EventRepository<'a>
impl<'a> UnsafeUnpin for EventRepository<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more