pub struct Store { /* private fields */ }Expand description
Keeps the directory lock until drop. Do not release this guard between the durable Unknown transition and a future dispatch/result commit. A failed commit poisons this guard; reopen and reconcile rather than retry mutation.
Implementations§
Source§impl Store
impl Store
pub fn open( root: &Path, expected: &Request, timeout: Duration, cancelled: impl Fn() -> bool, ) -> Result<Self, Invalid>
Sourcepub fn phase(&self) -> Option<Phase>
pub fn phase(&self) -> Option<Phase>
Informational only, possibly stale after a failed commit; never authority.
pub fn prepare( &mut self, inspection: &Response, labels: &[Label], ) -> Result<(), Invalid>
Sourcepub fn resume_prepared(
&mut self,
inspection: &Response,
labels: &[Label],
) -> Result<(), Invalid>
pub fn resume_prepared( &mut self, inspection: &Response, labels: &[Label], ) -> Result<(), Invalid>
Reopened Prepared records cannot authorize dispatch until a fresh, authenticated exact-ID inspection passes independently trusted labels. Caller authentication is required; this method validates data bindings.
Sourcepub fn begin_dispatch(&mut self) -> Result<DispatchAuthorization<'_>, Invalid>
pub fn begin_dispatch(&mut self) -> Result<DispatchAuthorization<'_>, Invalid>
Success means Unknown was synced. This method never starts a process.
Sourcepub fn recovery_request(&self) -> Result<Request, Invalid>
pub fn recovery_request(&self) -> Result<Request, Invalid>
Unknown recovery can only inspect the bound exact ID. No mutation token is issued and no transition back to Prepared exists.
pub fn observe_dispatch( &mut self, response: Option<&Response>, ) -> Result<(), Invalid>
pub fn reconcile(&mut self, inspection: &Response) -> Result<(), Invalid>
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl UnwindSafe for Store
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