Skip to main content

JobRepository

Trait JobRepository 

Source
pub trait JobRepository: Send + Sync {
    // Required method
    fn begin<'a>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn RepositoryUnitOfWork + 'a>, RepositoryError>> + Send + 'a>>;

    // Provided methods
    fn connection_capacity(&self) -> u32 { ... }
    fn descriptor(&self) -> RepositoryDescriptor { ... }
}
Expand description

Starts isolated repository units of work.

A unit of work does not become visible until it is committed. Dropping one without committing has rollback semantics.

Required Methods§

Source

fn begin<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn RepositoryUnitOfWork + 'a>, RepositoryError>> + Send + 'a>>

Begins a repository-owned unit of work.

The returned object may borrow this repository and cannot outlive it.

Provided Methods§

Source

fn connection_capacity(&self) -> u32

Returns the finite connection budget available to one execution tree.

In-memory adapters report a finite logical budget; durable adapters report the configured pool ceiling. Local-scale launch rejects a plan whose declared repository budget exceeds this value.

Source

fn descriptor(&self) -> RepositoryDescriptor

Publishes the versioned capability descriptor for this deployment.

The default declares nothing beyond the always-available lifecycle and checkpoint surface, so an adapter that has not been reviewed against a capability is negotiated as not providing it. Failing closed here costs a rejected launch; failing open would cost a silently weaker guarantee.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§