pub enum ResponsePromptCacheRetention {
InMemory,
X24h,
}Expand description
ResponsePromptCacheRetention
JSON schema
{
"anyOf": [
{
"description": "The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](/docs/guides/prompt-caching#prompt-cache-retention).\n",
"type": "string",
"enum": [
"in_memory",
"24h"
]
}
]
}Variants§
InMemory
The retention policy for the prompt cache. Set to 24h to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. Learn more.
X24h
The retention policy for the prompt cache. Set to 24h to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. Learn more.
Trait Implementations§
Source§impl Clone for ResponsePromptCacheRetention
impl Clone for ResponsePromptCacheRetention
Source§fn clone(&self) -> ResponsePromptCacheRetention
fn clone(&self) -> ResponsePromptCacheRetention
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 ResponsePromptCacheRetention
Source§impl Debug for ResponsePromptCacheRetention
impl Debug for ResponsePromptCacheRetention
Source§impl<'de> Deserialize<'de> for ResponsePromptCacheRetention
impl<'de> Deserialize<'de> for ResponsePromptCacheRetention
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 ResponsePromptCacheRetention
Source§impl Hash for ResponsePromptCacheRetention
impl Hash for ResponsePromptCacheRetention
Source§impl Ord for ResponsePromptCacheRetention
impl Ord for ResponsePromptCacheRetention
Source§fn cmp(&self, other: &ResponsePromptCacheRetention) -> Ordering
fn cmp(&self, other: &ResponsePromptCacheRetention) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for ResponsePromptCacheRetention
impl PartialOrd for ResponsePromptCacheRetention
impl StructuralPartialEq for ResponsePromptCacheRetention
Source§impl TryFrom<&String> for ResponsePromptCacheRetention
impl TryFrom<&String> for ResponsePromptCacheRetention
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for ResponsePromptCacheRetention
impl TryFrom<&str> for ResponsePromptCacheRetention
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for ResponsePromptCacheRetention
impl TryFrom<String> for ResponsePromptCacheRetention
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ResponsePromptCacheRetention
impl RefUnwindSafe for ResponsePromptCacheRetention
impl Send for ResponsePromptCacheRetention
impl Sync for ResponsePromptCacheRetention
impl Unpin for ResponsePromptCacheRetention
impl UnsafeUnpin for ResponsePromptCacheRetention
impl UnwindSafe for ResponsePromptCacheRetention
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