pub struct Store { /* private fields */ }Expand description
Workspace state adapter for admitted task mutations.
Implementations§
Source§impl Store
impl Store
Sourcepub fn remember_participant(
&self,
guard: &TaskGuard,
participant: &Participant,
) -> Result<bool, Problem>
pub fn remember_participant( &self, guard: &TaskGuard, participant: &Participant, ) -> Result<bool, Problem>
Persist the participant’s verified placement hint.
Trait Implementations§
Source§impl AmendState for Store
impl AmendState for Store
Source§type Checkpoint = RevisionCheckpoint
type Checkpoint = RevisionCheckpoint
State saved before amendment effects begin.
Source§fn staging_available(&self, path: &Path) -> Result<bool, Problem>
fn staging_available(&self, path: &Path) -> Result<bool, Problem>
May a private staging name be used without adopting an existing entry?
Source§fn same_destination(&self, left: &Path, right: &Path) -> Result<bool, Problem>
fn same_destination(&self, left: &Path, right: &Path) -> Result<bool, Problem>
Does this sibling spelling identify the same directory on this volume?
Source§fn begin_amend(
&self,
guard: &TaskGuard,
task: &Task,
request: &AmendRequest,
targets: &[RemovalTarget],
) -> Result<RevisionCheckpoint, Problem>
fn begin_amend( &self, guard: &TaskGuard, task: &Task, request: &AmendRequest, targets: &[RemovalTarget], ) -> Result<RevisionCheckpoint, Problem>
Record the requested changes and bind their removal targets.
Source§fn unchanged_amend(
&self,
guard: &TaskGuard,
checkpoint: RevisionCheckpoint,
) -> Result<(), Problem>
fn unchanged_amend( &self, guard: &TaskGuard, checkpoint: RevisionCheckpoint, ) -> Result<(), Problem>
Restore the checkpoint when the amendment produced no effects.
Source§fn removal_targets(
&self,
guard: &TaskGuard,
) -> Result<Vec<RemovalTarget>, Problem>
fn removal_targets( &self, guard: &TaskGuard, ) -> Result<Vec<RemovalTarget>, Problem>
Read the participants bound to the pending removal.
Source§fn settle_unlink(
&self,
guard: &TaskGuard,
task: &Task,
target: &RemovalTarget,
) -> Result<(), Problem>
fn settle_unlink( &self, guard: &TaskGuard, task: &Task, target: &RemovalTarget, ) -> Result<(), Problem>
Publish confirmed unlink and compacted membership as a single revision.
Source§fn amend_request(
&self,
guard: &TaskGuard,
) -> Result<Option<AmendRequest>, Problem>
fn amend_request( &self, guard: &TaskGuard, ) -> Result<Option<AmendRequest>, Problem>
Read the recorded request for amendment recovery.
Source§impl RecoveryState for Store
impl RecoveryState for Store
Source§impl State for Store
impl State for Store
Source§fn verify(&self) -> Result<(), Problem>
fn verify(&self) -> Result<(), Problem>
Revalidate the workspace binding before relying on its state.
Source§fn validate_destination(&self, path: &Path) -> Result<(), Problem>
fn validate_destination(&self, path: &Path) -> Result<(), Problem>
Check that the proposed workspace path is available.
Source§fn reserve(&self, path: &Path) -> Result<(), Problem>
fn reserve(&self, path: &Path) -> Result<(), Problem>
Reserve the proposed destination on the filesystem.
Source§fn admit(&self, name: &str) -> Result<TaskGuard, Problem>
fn admit(&self, name: &str) -> Result<TaskGuard, Problem>
Acquire operation admission for the named task.
Source§fn ensure_new(&self, admission: &TaskGuard, name: &str) -> Result<(), Problem>
fn ensure_new(&self, admission: &TaskGuard, name: &str) -> Result<(), Problem>
Check under admission that the proposed task can be created.
Source§fn next_generation(&self, admission: &TaskGuard) -> Result<u64, Problem>
fn next_generation(&self, admission: &TaskGuard) -> Result<u64, Problem>
Allocate a fresh incarnation for this task name.
Source§fn cleanup_retired(
&self,
admission: &TaskGuard,
task: &Task,
) -> Result<(), Problem>
fn cleanup_retired( &self, admission: &TaskGuard, task: &Task, ) -> Result<(), Problem>
Clean up retained state belonging to the retired incarnation.
Source§fn record_path(&self, admission: &TaskGuard) -> PathBuf
fn record_path(&self, admission: &TaskGuard) -> PathBuf
Return the authoritative document path for the admitted task.
Source§fn begin(&self, admission: &TaskGuard, task: &Task) -> Result<(), Problem>
fn begin(&self, admission: &TaskGuard, task: &Task) -> Result<(), Problem>
Publish initial task state while admission is held.
Source§fn effect(
&self,
admission: &TaskGuard,
task: &Task,
index: usize,
settled: bool,
) -> Result<(), Problem>
fn effect( &self, admission: &TaskGuard, task: &Task, index: usize, settled: bool, ) -> Result<(), Problem>
Compatibility hook for existing state adapters.
Source§fn save(&self, admission: &TaskGuard, task: &Task) -> Result<(), Problem>
fn save(&self, admission: &TaskGuard, task: &Task) -> Result<(), Problem>
Publish updated task state while admission is held.
Source§fn record_effect(
&self,
admission: &Self::Admission,
task: &Task,
index: usize,
state: EffectState,
) -> Result<(), Problem>
fn record_effect( &self, admission: &Self::Admission, task: &Task, index: usize, state: EffectState, ) -> Result<(), Problem>
Named entry point; delegates to the legacy hook for existing adapters.
Auto Trait Implementations§
impl Forget for Store
impl Freeze for Store
impl Move 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