pub enum CovTimeRemaining {
Indefinite,
Finite(NonZeroU32),
Expired,
}Expand description
Monotonic remaining lifetime before a new COV notification is admitted.
Variants§
Indefinite
No expiry; represented by zero in an owned ordinary COV notification.
Finite(NonZeroU32)
A live finite lifetime, rounded upward and bounded to the wire range.
Expired
The deadline has been reached; it cannot authorize a new notification.
Implementations§
Source§impl CovTimeRemaining
impl CovTimeRemaining
Sourcepub fn at(expires_at: Option<Instant>, now: Instant) -> Self
pub fn at(expires_at: Option<Instant>, now: Instant) -> Self
Project one supplied monotonic instant. Positive fractions round upward; values beyond the wire range saturate. This is a local representation policy.
Sourcepub fn wire_seconds(self) -> Option<u32>
pub fn wire_seconds(self) -> Option<u32>
Wire seconds for an eligible owned subscription; expiry is never wire zero.
Trait Implementations§
Source§impl Clone for CovTimeRemaining
impl Clone for CovTimeRemaining
impl Copy for CovTimeRemaining
Source§impl Debug for CovTimeRemaining
impl Debug for CovTimeRemaining
impl Eq for CovTimeRemaining
Source§impl PartialEq for CovTimeRemaining
impl PartialEq for CovTimeRemaining
impl StructuralPartialEq for CovTimeRemaining
Auto Trait Implementations§
impl Freeze for CovTimeRemaining
impl RefUnwindSafe for CovTimeRemaining
impl Send for CovTimeRemaining
impl Sync for CovTimeRemaining
impl Unpin for CovTimeRemaining
impl UnsafeUnpin for CovTimeRemaining
impl UnwindSafe for CovTimeRemaining
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