#[non_exhaustive]pub enum RefreshBuffer {
Adaptive(Duration),
Fixed(Duration),
}Expand description
Immutable early-refresh policy. Fixed buffers preserve the source’s absolute window.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Adaptive(Duration)
Cap the chosen maximum at 20% of the issued TTL so short leases remain usable.
Fixed(Duration)
An absolute window; zero disables early refresh and a window >= TTL refreshes each call.
Trait Implementations§
Source§impl Clone for RefreshBuffer
impl Clone for RefreshBuffer
impl Copy for RefreshBuffer
Source§impl Debug for RefreshBuffer
impl Debug for RefreshBuffer
Source§impl Default for RefreshBuffer
impl Default for RefreshBuffer
impl Eq for RefreshBuffer
Source§impl PartialEq for RefreshBuffer
impl PartialEq for RefreshBuffer
impl StructuralPartialEq for RefreshBuffer
Auto Trait Implementations§
impl Freeze for RefreshBuffer
impl RefUnwindSafe for RefreshBuffer
impl Send for RefreshBuffer
impl Sync for RefreshBuffer
impl Unpin for RefreshBuffer
impl UnsafeUnpin for RefreshBuffer
impl UnwindSafe for RefreshBuffer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.