pub struct CachePoint {
pub label: String,
pub cache_type: String,
}Expand description
A single cache-breakpoint marker for prompt caching.
Maps to Anthropic’s cache_control blocks. Providers that don’t support
prompt caching (Codex, OpenCode) ignore these.
Fields§
§label: StringLogical name (e.g. "system", "tools", "history").
cache_type: StringCache type — Anthropic accepts "ephemeral" today.
Implementations§
Source§impl CachePoint
impl CachePoint
pub fn ephemeral(label: impl Into<String>) -> CachePoint
Trait Implementations§
Source§impl Clone for CachePoint
impl Clone for CachePoint
Source§fn clone(&self) -> CachePoint
fn clone(&self) -> CachePoint
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 moreSource§impl Debug for CachePoint
impl Debug for CachePoint
Source§impl Default for CachePoint
impl Default for CachePoint
Source§fn default() -> CachePoint
fn default() -> CachePoint
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CachePoint
impl<'de> Deserialize<'de> for CachePoint
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CachePoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CachePoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CachePoint
impl Serialize for CachePoint
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CachePoint
impl RefUnwindSafe for CachePoint
impl Send for CachePoint
impl Sync for CachePoint
impl Unpin for CachePoint
impl UnsafeUnpin for CachePoint
impl UnwindSafe for CachePoint
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