pub enum CacheState {
Cold,
Warm {
cold_in: Option<Duration>,
},
}Expand description
The state of a prompt-cache entry at one moment.
Variants§
Cold
Nothing is cached: no request has been sent yet, or the entry’s lifetime has passed since it was last started.
Warm
The entry can still be read.
Fields
§
cold_in: Option<Duration>How long until the entry goes cold; None when it never does
(CacheLifetime::Permanent).
Trait Implementations§
Source§impl Clone for CacheState
impl Clone for CacheState
impl Copy for CacheState
Source§impl Debug for CacheState
impl Debug for CacheState
impl Eq for CacheState
Source§impl PartialEq for CacheState
impl PartialEq for CacheState
impl StructuralPartialEq for CacheState
Auto Trait Implementations§
impl Forget for CacheState
impl Freeze for CacheState
impl Move for CacheState
impl RefUnwindSafe for CacheState
impl Send for CacheState
impl Sync for CacheState
impl Unpin for CacheState
impl UnsafeUnpin for CacheState
impl UnwindSafe for CacheState
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.