pub struct InviteExpiry { /* private fields */ }Expand description
Ends this device’s invites as their lifetimes end, from the store’s opening until its handle closes. Dropping it stops the wakes too. A panic in it goes to the store’s bug sink and ends the wakes, as does a bug a write returns; the next open writes the expiries that passed.
Implementations§
Source§impl InviteExpiry
impl InviteExpiry
Sourcepub async fn opened(
database: &StoreDatabase,
now: SystemTime,
) -> Result<(), DbError>
pub async fn opened( database: &StoreDatabase, now: SystemTime, ) -> Result<(), DbError>
End each invite whose lifetime ended while the store was closed, as it opens, before any app reads its invites. A failed write fails the handle with its cause.
Sourcepub fn start(
database: StoreDatabase,
clock: ClockRef,
waits: Arc<RetryWaits>,
state: Arc<SequenceState>,
) -> Self
pub fn start( database: StoreDatabase, clock: ClockRef, waits: Arc<RetryWaits>, state: Arc<SequenceState>, ) -> Self
Wake at each invite’s expiry and write it, until closed. A new invite brings its expiry into the wakes as it is made.
Sourcepub fn parked_from_now(&self) -> impl Future<Output = ()> + Send + 'static
pub fn parked_from_now(&self) -> impl Future<Output = ()> + Send + 'static
Each time the wakes have written every expiry the clock has reached, and wait for the next.
Auto Trait Implementations§
impl !Freeze for InviteExpiry
impl !RefUnwindSafe for InviteExpiry
impl Send for InviteExpiry
impl Sync for InviteExpiry
impl Unpin for InviteExpiry
impl UnsafeUnpin for InviteExpiry
impl UnwindSafe for InviteExpiry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.