pub struct ExpirableOptions {
pub ttl: u64,
pub auto_refresh: bool,
pub auto_clear_expired: bool,
pub warning_threshold: Option<u64>,
}Expand description
Options for expirable values.
Fields§
§ttl: u64Time-to-live in seconds.
auto_refresh: boolWhether to automatically refresh the TTL on access.
auto_clear_expired: boolWhether to automatically clear expired values.
warning_threshold: Option<u64>Seconds before expiry to show a warning (None = no warning).
Implementations§
Trait Implementations§
Source§impl Clone for ExpirableOptions
impl Clone for ExpirableOptions
Source§fn clone(&self) -> ExpirableOptions
fn clone(&self) -> ExpirableOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExpirableOptions
impl Debug for ExpirableOptions
Auto Trait Implementations§
impl Freeze for ExpirableOptions
impl RefUnwindSafe for ExpirableOptions
impl Send for ExpirableOptions
impl Sync for ExpirableOptions
impl Unpin for ExpirableOptions
impl UnwindSafe for ExpirableOptions
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