pub struct BufferedSessionMetadataStore { /* private fields */ }Expand description
Background writer for runtime session metadata snapshots.
Each queued snapshot is written in order, and every write replaces the
previous file atomically. The handle itself only performs channel sends;
filesystem work happens on its worker thread. flush is the explicit
durability boundary used before a session exits.
Implementations§
Source§impl BufferedSessionMetadataStore
impl BufferedSessionMetadataStore
Sourcepub fn write(&self, metadata: SessionMetadata) -> Result<(), PersistenceError>
pub fn write(&self, metadata: SessionMetadata) -> Result<(), PersistenceError>
Queue a complete metadata snapshot without doing filesystem I/O in the caller.
Sourcepub fn flush(&self) -> Result<(), PersistenceError>
pub fn flush(&self) -> Result<(), PersistenceError>
Drain queued snapshots and wait until the latest one is durable.
Trait Implementations§
Source§impl Debug for BufferedSessionMetadataStore
impl Debug for BufferedSessionMetadataStore
Source§impl Drop for BufferedSessionMetadataStore
impl Drop for BufferedSessionMetadataStore
Auto Trait Implementations§
impl !RefUnwindSafe for BufferedSessionMetadataStore
impl !UnwindSafe for BufferedSessionMetadataStore
impl Freeze for BufferedSessionMetadataStore
impl Send for BufferedSessionMetadataStore
impl Sync for BufferedSessionMetadataStore
impl Unpin for BufferedSessionMetadataStore
impl UnsafeUnpin for BufferedSessionMetadataStore
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