#[non_exhaustive]pub struct ManagedCOVSubscriptionOptions {
pub renewal_margin: Duration,
pub event_channel_capacity: usize,
}Expand description
Options for a managed finite COV subscription.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.renewal_margin: DurationHow long before the known remaining lifetime the helper should renew.
The helper schedules renewal at time_remaining - renewal_margin, using
the requested lifetime until inbound notifications provide a fresher
time_remaining value.
event_channel_capacity: usizeCapacity of the renewal event broadcast channel.
Accepted range is 1..=MAX_COV_CHANNEL_CAPACITY.
Implementations§
Source§impl ManagedCOVSubscriptionOptions
impl ManagedCOVSubscriptionOptions
Sourcepub fn with_renewal_margin(self, margin: Duration) -> Self
pub fn with_renewal_margin(self, margin: Duration) -> Self
Set the renewal margin.
Sourcepub fn with_event_channel_capacity(self, capacity: usize) -> Self
pub fn with_event_channel_capacity(self, capacity: usize) -> Self
Set the renewal event broadcast channel capacity.
Trait Implementations§
Source§impl Clone for ManagedCOVSubscriptionOptions
impl Clone for ManagedCOVSubscriptionOptions
Source§fn clone(&self) -> ManagedCOVSubscriptionOptions
fn clone(&self) -> ManagedCOVSubscriptionOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ManagedCOVSubscriptionOptions
impl RefUnwindSafe for ManagedCOVSubscriptionOptions
impl Send for ManagedCOVSubscriptionOptions
impl Sync for ManagedCOVSubscriptionOptions
impl Unpin for ManagedCOVSubscriptionOptions
impl UnsafeUnpin for ManagedCOVSubscriptionOptions
impl UnwindSafe for ManagedCOVSubscriptionOptions
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