pub enum Ttl {
Missing,
Forever,
In(Duration),
}Expand description
What a key says about when it goes away.
Three answers rather than two, because a key that is not there and a key
that is never going away are different things and code that confuses them
deletes the wrong data. Redis says this with -2 and -1 and hopes you
read the manual.
Variants§
Missing
There is no such key.
Forever
The key is there and nothing is going to take it away.
In(Duration)
The key is there and this much of it is left.
Implementations§
Trait Implementations§
impl Copy for Ttl
impl Eq for Ttl
impl StructuralPartialEq for Ttl
Auto Trait Implementations§
impl Freeze 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