Skip to main content

MultiRootMaterializer

Trait MultiRootMaterializer 

Source
pub trait MultiRootMaterializer<A, O>: Send + Sync {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn materialize(
        &self,
        operation_id: OperationId,
        root_id: WorkspaceRootId,
        workspace: &Workspace<A, O>,
        from: GenerationId,
        to: GenerationId,
    ) -> impl Future<Output = Result<(), Self::Error>> + StorageFuture;

    // Provided method
    fn finalize(
        &self,
        _operation_id: OperationId,
        _root_id: WorkspaceRootId,
    ) -> impl Future<Output = Result<(), Self::Error>> + StorageFuture { ... }
}
Expand description

Applies one logically published root generation to its host checkout.

Implementations are injected capabilities: the coordinator owns retry and ordering, while a native host may use the core journaled materializer and a non-native host may deliberately provide no physical checkout.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Materialization failure.

Required Methods§

Source

fn materialize( &self, operation_id: OperationId, root_id: WorkspaceRootId, workspace: &Workspace<A, O>, from: GenerationId, to: GenerationId, ) -> impl Future<Output = Result<(), Self::Error>> + StorageFuture

Idempotently applies the exact published generation for one root.

Provided Methods§

Source

fn finalize( &self, _operation_id: OperationId, _root_id: WorkspaceRootId, ) -> impl Future<Output = Result<(), Self::Error>> + StorageFuture

Reclaims terminal physical recovery state. Logical publication is already durable when this runs, so failures are retried on recovery.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§