pub struct PromptCachePublication { /* private fields */ }Expand description
A runtime-owned staging directory that publishes one immutable cache atomically.
Implementations§
Source§impl PromptCachePublication
impl PromptCachePublication
Sourcepub fn begin(
destination: impl AsRef<Path>,
replace_existing: bool,
) -> Result<Self, PromptCachePersistenceError>
pub fn begin( destination: impl AsRef<Path>, replace_existing: bool, ) -> Result<Self, PromptCachePersistenceError>
Creates an isolated staging directory for a new cache or replacement generation.
Sourcepub fn staging_directory(&self) -> &Path
pub fn staging_directory(&self) -> &Path
Directory into which the backend writes its native tensor shards.
Sourcepub fn commit(
self,
manifest: &PromptCacheManifest,
) -> Result<(), PromptCachePersistenceError>
pub fn commit( self, manifest: &PromptCacheManifest, ) -> Result<(), PromptCachePersistenceError>
Writes the manifest, validates every shard, and atomically publishes the cache.
Trait Implementations§
Source§impl Debug for PromptCachePublication
impl Debug for PromptCachePublication
Source§impl Drop for PromptCachePublication
impl Drop for PromptCachePublication
Auto Trait Implementations§
impl Freeze for PromptCachePublication
impl RefUnwindSafe for PromptCachePublication
impl Send for PromptCachePublication
impl Sync for PromptCachePublication
impl Unpin for PromptCachePublication
impl UnsafeUnpin for PromptCachePublication
impl UnwindSafe for PromptCachePublication
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