pub struct WorkspaceMultiRootPublisher<A, O, R> { /* private fields */ }Expand description
SDK-owned publisher over ordinary immutable workspace joins.
Preparation validates pinned inputs and resolutions against a disposable SDK workspace. It never changes the target. Publication then repeats the same deterministic join through the target’s fenced authority CAS.
Implementations§
Source§impl<A, O, R> WorkspaceMultiRootPublisher<A, O, R>
impl<A, O, R> WorkspaceMultiRootPublisher<A, O, R>
Sourcepub fn with_merge_drivers(self, registry: Arc<MergeDriverRegistry>) -> Self
pub fn with_merge_drivers(self, registry: Arc<MergeDriverRegistry>) -> Self
Uses one immutable-input driver registry for conflict resolution.
Sourcepub fn with_root_merge_drivers(
self,
root_id: WorkspaceRootId,
registry: Arc<MergeDriverRegistry>,
) -> Self
pub fn with_root_merge_drivers( self, root_id: WorkspaceRootId, registry: Arc<MergeDriverRegistry>, ) -> Self
Overrides merge-driver selection for one root in a multi-root plan.
Trait Implementations§
Source§impl<A, O, R> MultiRootPublisher for WorkspaceMultiRootPublisher<A, O, R>
impl<A, O, R> MultiRootPublisher for WorkspaceMultiRootPublisher<A, O, R>
Source§type Error = WorkspaceMultiRootPublisherError<<R as WorkspaceResolver<A, O>>::Error>
type Error = WorkspaceMultiRootPublisherError<<R as WorkspaceResolver<A, O>>::Error>
Publisher error.
Source§async fn prepare(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
resolutions: &BTreeMap<ConflictKey, MergeResolution>,
) -> Result<MultiRootPrepare, Self::Error>
async fn prepare( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, resolutions: &BTreeMap<ConflictKey, MergeResolution>, ) -> Result<MultiRootPrepare, Self::Error>
Atomically validates and reserves the exact pinned target. Repeating
this call for one operation must return the same live reservation.
Source§async fn release(
&self,
operation_id: OperationId,
_root_id: WorkspaceRootId,
fence: &MultiRootFence,
) -> Result<(), Self::Error>
async fn release( &self, operation_id: OperationId, _root_id: WorkspaceRootId, fence: &MultiRootFence, ) -> Result<(), Self::Error>
Releases a reservation when validation fails before a commit decision.
Source§async fn project_conflict(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
conflict: Option<&MergePlan>,
) -> Result<GenerationId, Self::Error>
async fn project_conflict( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, conflict: Option<&MergePlan>, ) -> Result<GenerationId, Self::Error>
Projects one root into its durable conflicted working state.
Source§async fn abort_conflict(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
projected_generation: GenerationId,
) -> Result<GenerationId, Self::Error>
async fn abort_conflict( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, projected_generation: GenerationId, ) -> Result<GenerationId, Self::Error>
Restores one projected root to its exact pre-merge generation.
Source§async fn declare_conflicts(
&self,
_operation_id: OperationId,
_root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
conflict: &MergePlan,
paths: &[String],
) -> Result<BTreeSet<ConflictKey>, Self::Error>
async fn declare_conflicts( &self, _operation_id: OperationId, _root_id: WorkspaceRootId, root: &MultiRootMergeRoot, conflict: &MergePlan, paths: &[String], ) -> Result<BTreeSet<ConflictKey>, Self::Error>
Validates explicitly staged conflict paths and returns their exact keys.
Source§async fn finish_conflict(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
projected_generation: GenerationId,
) -> Result<MultiRootConflictFinish, Self::Error>
async fn finish_conflict( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, projected_generation: GenerationId, ) -> Result<MultiRootConflictFinish, Self::Error>
Captures the current resolved working generation during continue.
Source§async fn publish(
&self,
operation_id: OperationId,
root_id: WorkspaceRootId,
root: &MultiRootMergeRoot,
resolutions: &BTreeMap<ConflictKey, MergeResolution>,
fence: &MultiRootFence,
) -> Result<MultiRootPublishRoot, Self::Error>
async fn publish( &self, operation_id: OperationId, root_id: WorkspaceRootId, root: &MultiRootMergeRoot, resolutions: &BTreeMap<ConflictKey, MergeResolution>, fence: &MultiRootFence, ) -> Result<MultiRootPublishRoot, Self::Error>
Idempotently rolls one root forward after the durable commit decision.
Source§fn finalize(
&self,
_operation_id: OperationId,
_root_id: WorkspaceRootId,
_root: &MultiRootMergeRoot,
) -> impl Future<Output = Result<(), Self::Error>> + StorageFuture
fn finalize( &self, _operation_id: OperationId, _root_id: WorkspaceRootId, _root: &MultiRootMergeRoot, ) -> impl Future<Output = Result<(), Self::Error>> + StorageFuture
Reclaims terminal per-root recovery state after the all-roots Applied
decision is durable. It must be idempotent because restart recovery
retries cleanup independently of logical publication.
Auto Trait Implementations§
impl<A, O, R> !Freeze for WorkspaceMultiRootPublisher<A, O, R>
impl<A, O, R> !RefUnwindSafe for WorkspaceMultiRootPublisher<A, O, R>
impl<A, O, R> !UnwindSafe for WorkspaceMultiRootPublisher<A, O, R>
impl<A, O, R> Send for WorkspaceMultiRootPublisher<A, O, R>
impl<A, O, R> Sync for WorkspaceMultiRootPublisher<A, O, R>
impl<A, O, R> Unpin for WorkspaceMultiRootPublisher<A, O, R>
impl<A, O, R> UnsafeUnpin for WorkspaceMultiRootPublisher<A, O, R>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request