pub struct FileResumeStore { /* private fields */ }Expand description
Disk checkpoint storage: JSON persistence + atomic write.
Atomic write: write pending.json.tmp first, then rename, so a crash never
leaves a partial checkpoint. The directory is chosen by the caller;
concurrent executors must use separate directories to avoid overwriting
each other’s checkpoints.
Implementations§
Trait Implementations§
Source§impl ResumeStore for FileResumeStore
impl ResumeStore for FileResumeStore
Source§fn save_pending<'life0, 'life1, 'async_trait>(
&'life0 self,
pending: &'life1 PendingApproval,
) -> Pin<Box<dyn Future<Output = Result<(), ResumeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_pending<'life0, 'life1, 'async_trait>(
&'life0 self,
pending: &'life1 PendingApproval,
) -> Pin<Box<dyn Future<Output = Result<(), ResumeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persists a pending-approval checkpoint.
Source§fn load_pending<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<PendingApproval>, ResumeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_pending<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<PendingApproval>, ResumeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads the current checkpoint; returns
None if absent.Source§fn clear_pending<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ResumeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_pending<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ResumeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clears the checkpoint (decision finalized / checkpoint claimed). Treats absence as success.
Auto Trait Implementations§
impl Freeze for FileResumeStore
impl RefUnwindSafe for FileResumeStore
impl Send for FileResumeStore
impl Sync for FileResumeStore
impl Unpin for FileResumeStore
impl UnsafeUnpin for FileResumeStore
impl UnwindSafe for FileResumeStore
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