pub enum Ttl {
None,
Forever,
Milliseconds(f64),
String(String),
}Expand description
How long a query stays cached after its last use.
Forever and negative durations never expire, None expires
immediately. Durations are clamped to 10 minutes when sent to the server.
Variants§
None
Expires as soon as nothing uses the query.
Forever
Never expires.
Milliseconds(f64)
A duration in milliseconds.
String(String)
A duration string as JS accepts it: a number followed by s, m,
h, d, or y (for example "5m").
Implementations§
Trait Implementations§
impl StructuralPartialEq for Ttl
Auto Trait Implementations§
impl Forget for Ttl
impl Freeze for Ttl
impl Move for Ttl
impl RefUnwindSafe for Ttl
impl Send for Ttl
impl Sync for Ttl
impl Unpin for Ttl
impl UnsafeUnpin for Ttl
impl UnwindSafe for Ttl
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