pub struct ClaudeExplicitCacheBreakpoint {
pub target: ClaudeCacheBreakpointTarget,
pub ttl: Option<ClaudePromptCacheTtl>,
}Expand description
Explicit Claude cache breakpoint.
Fields§
§target: ClaudeCacheBreakpointTargetBlock target where cache control should be applied.
ttl: Option<ClaudePromptCacheTtl>Optional TTL override for this breakpoint.
When omitted, request-level ClaudePromptCache::ttl is used.
Implementations§
Source§impl ClaudeExplicitCacheBreakpoint
impl ClaudeExplicitCacheBreakpoint
Sourcepub const fn new(target: ClaudeCacheBreakpointTarget) -> Self
pub const fn new(target: ClaudeCacheBreakpointTarget) -> Self
Creates a breakpoint for the given target using request-level default TTL.
Sourcepub const fn with_ttl(self, ttl: ClaudePromptCacheTtl) -> Self
pub const fn with_ttl(self, ttl: ClaudePromptCacheTtl) -> Self
Overrides TTL for this breakpoint.
Sourcepub const fn effective_ttl(
self,
default_ttl: ClaudePromptCacheTtl,
) -> ClaudePromptCacheTtl
pub const fn effective_ttl( self, default_ttl: ClaudePromptCacheTtl, ) -> ClaudePromptCacheTtl
Returns the effective TTL for this breakpoint.
Trait Implementations§
Source§impl Clone for ClaudeExplicitCacheBreakpoint
impl Clone for ClaudeExplicitCacheBreakpoint
Source§fn clone(&self) -> ClaudeExplicitCacheBreakpoint
fn clone(&self) -> ClaudeExplicitCacheBreakpoint
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 ClaudeExplicitCacheBreakpoint
Source§impl<'de> Deserialize<'de> for ClaudeExplicitCacheBreakpoint
impl<'de> Deserialize<'de> for ClaudeExplicitCacheBreakpoint
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 ClaudeExplicitCacheBreakpoint
impl StructuralPartialEq for ClaudeExplicitCacheBreakpoint
Auto Trait Implementations§
impl Freeze for ClaudeExplicitCacheBreakpoint
impl RefUnwindSafe for ClaudeExplicitCacheBreakpoint
impl Send for ClaudeExplicitCacheBreakpoint
impl Sync for ClaudeExplicitCacheBreakpoint
impl Unpin for ClaudeExplicitCacheBreakpoint
impl UnsafeUnpin for ClaudeExplicitCacheBreakpoint
impl UnwindSafe for ClaudeExplicitCacheBreakpoint
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