pub struct LiveCacheBlockPublication { /* private fields */ }Expand description
Runtime-owned unique staging and atomic publication for one live-cache block.
Implementations§
Source§impl LiveCacheBlockPublication
impl LiveCacheBlockPublication
Sourcepub fn begin(directory: &Path, id: &CacheBlockId) -> Self
pub fn begin(directory: &Path, id: &CacheBlockId) -> Self
Reserves unique paths derived from the complete block and rank identity.
Sourcepub fn staging_path(&self) -> &Path
pub fn staging_path(&self) -> &Path
Unique temporary path into which the backend serializes native storage.
Sourcepub fn destination_path(&self) -> &Path
pub fn destination_path(&self) -> &Path
Final unique path used by the live-cache catalog.
Sourcepub fn commit(self) -> Result<PathBuf, LiveCachePublicationError>
pub fn commit(self) -> Result<PathBuf, LiveCachePublicationError>
Atomically publishes the staged file without replacing an existing path.
Trait Implementations§
Source§impl Debug for LiveCacheBlockPublication
impl Debug for LiveCacheBlockPublication
Source§impl Drop for LiveCacheBlockPublication
impl Drop for LiveCacheBlockPublication
Auto Trait Implementations§
impl Freeze for LiveCacheBlockPublication
impl RefUnwindSafe for LiveCacheBlockPublication
impl Send for LiveCacheBlockPublication
impl Sync for LiveCacheBlockPublication
impl Unpin for LiveCacheBlockPublication
impl UnsafeUnpin for LiveCacheBlockPublication
impl UnwindSafe for LiveCacheBlockPublication
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