pub struct PromptCacheOptions { /* private fields */ }Expand description
Explicit publication behavior for a reusable prefix cache.
Implementations§
Source§impl PromptCacheOptions
impl PromptCacheOptions
Sourcepub fn new(
application_namespace: Option<String>,
replace_existing: bool,
) -> Result<Self, PromptCacheError>
pub fn new( application_namespace: Option<String>, replace_existing: bool, ) -> Result<Self, PromptCacheError>
Creates validated prompt-cache publication options.
Sourcepub fn application_namespace(&self) -> Option<&str>
pub fn application_namespace(&self) -> Option<&str>
Returns the optional application grouping label.
Sourcepub const fn replace_existing(&self) -> bool
pub const fn replace_existing(&self) -> bool
Returns whether an existing destination may be replaced atomically.
Trait Implementations§
Source§impl Clone for PromptCacheOptions
impl Clone for PromptCacheOptions
Source§fn clone(&self) -> PromptCacheOptions
fn clone(&self) -> PromptCacheOptions
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 PromptCacheOptions
impl Debug for PromptCacheOptions
Source§impl Default for PromptCacheOptions
impl Default for PromptCacheOptions
Source§fn default() -> PromptCacheOptions
fn default() -> PromptCacheOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PromptCacheOptions
impl RefUnwindSafe for PromptCacheOptions
impl Send for PromptCacheOptions
impl Sync for PromptCacheOptions
impl Unpin for PromptCacheOptions
impl UnsafeUnpin for PromptCacheOptions
impl UnwindSafe for PromptCacheOptions
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