pub enum CacheDirective {
None,
StablePrefix,
}Expand description
Prompt-cache instruction carried on a ModelRequest. The Anthropic
translation face renders explicit cache_control breakpoints at the
stable-prefix anchors; OpenAI-family providers cache server-side and
accept the directive as a documented no-op.
Variants§
None
Mark no cache breakpoints (the default; OpenAI server-side caching applies regardless).
StablePrefix
Mark the stable-prefix anchors so provider caches cover the tool surface, the system prefix, and the latest stable conversation message.
Trait Implementations§
Source§impl Clone for CacheDirective
impl Clone for CacheDirective
Source§fn clone(&self) -> CacheDirective
fn clone(&self) -> CacheDirective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CacheDirective
Source§impl Debug for CacheDirective
impl Debug for CacheDirective
Source§impl Default for CacheDirective
impl Default for CacheDirective
Source§fn default() -> CacheDirective
fn default() -> CacheDirective
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CacheDirective
impl<'de> Deserialize<'de> for CacheDirective
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 CacheDirective
Source§impl PartialEq for CacheDirective
impl PartialEq for CacheDirective
Source§impl Serialize for CacheDirective
impl Serialize for CacheDirective
impl StructuralPartialEq for CacheDirective
Auto Trait Implementations§
impl Freeze for CacheDirective
impl RefUnwindSafe for CacheDirective
impl Send for CacheDirective
impl Sync for CacheDirective
impl Unpin for CacheDirective
impl UnsafeUnpin for CacheDirective
impl UnwindSafe for CacheDirective
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