pub enum CacheHint {
Write {
ttl: Duration,
},
Read,
}Expand description
Hint attached to messages indicating the desired cache action.
Adapters inspect this during message conversion to translate into
provider-specific cache control (e.g., Anthropic’s cache_control field).
Variants§
Write
Write (or refresh) the cached prefix with the given TTL.
Read
Read from an existing cached prefix.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CacheHint
impl<'de> Deserialize<'de> for CacheHint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CacheHint
impl StructuralPartialEq for CacheHint
Auto Trait Implementations§
impl Freeze for CacheHint
impl RefUnwindSafe for CacheHint
impl Send for CacheHint
impl Sync for CacheHint
impl Unpin for CacheHint
impl UnsafeUnpin for CacheHint
impl UnwindSafe for CacheHint
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