Skip to main content

Store

Struct Store 

Source
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

Source

pub fn open( root: &Path, expected: &Request, timeout: Duration, cancelled: impl Fn() -> bool, ) -> Result<Self, Invalid>

Source

pub fn phase(&self) -> Option<Phase>

Informational only, possibly stale after a failed commit; never authority.

Source

pub fn prepare( &mut self, inspection: &Response, labels: &[Label], ) -> Result<(), Invalid>

Source

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.

Source

pub fn begin_dispatch(&mut self) -> Result<DispatchAuthorization<'_>, Invalid>

Success means Unknown was synced. This method never starts a process.

Source

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.

Source

pub fn observe_dispatch( &mut self, response: Option<&Response>, ) -> Result<(), Invalid>

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.