pub struct PostgresJobRepository { /* private fields */ }Expand description
Durable PostgreSQL implementation of JobRepository.
PostgreSQL identity columns issue instance and execution identifiers, so
allocations remain collision-free across process restarts.
Implementations§
Source§impl PostgresJobRepository
impl PostgresJobRepository
Sourcepub async fn connect(
config: PostgresConfig,
clock: Arc<dyn Clock>,
) -> Result<Self, RepositoryError>
pub async fn connect( config: PostgresConfig, clock: Arc<dyn Clock>, ) -> Result<Self, RepositoryError>
Opens and verifies a repository-owned PostgreSQL pool.
§Errors
Returns a redacted unavailable or schema-version failure. Call
PostgresMigrator::migrate separately with a migrator identity.
Trait Implementations§
Source§impl Clone for PostgresJobRepository
impl Clone for PostgresJobRepository
Source§fn clone(&self) -> PostgresJobRepository
fn clone(&self) -> PostgresJobRepository
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostgresJobRepository
impl Debug for PostgresJobRepository
Source§impl JobRepository for PostgresJobRepository
impl JobRepository for PostgresJobRepository
Source§fn descriptor(&self) -> RepositoryDescriptor
fn descriptor(&self) -> RepositoryDescriptor
Schema 3 provides every capability this milestone defines. The pool size above is a throughput setting and is deliberately absent here: capabilities describe what the deployment can do, not how fast.
Source§fn connection_capacity(&self) -> u32
fn connection_capacity(&self) -> u32
Returns the finite connection budget available to one execution tree. Read more
Source§fn begin<'a>(
&'a self,
) -> BoxFuture<'a, Result<Box<dyn RepositoryUnitOfWork + 'a>, RepositoryError>>
fn begin<'a>( &'a self, ) -> BoxFuture<'a, Result<Box<dyn RepositoryUnitOfWork + 'a>, RepositoryError>>
Begins a repository-owned unit of work. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresJobRepository
impl !UnwindSafe for PostgresJobRepository
impl Freeze for PostgresJobRepository
impl Send for PostgresJobRepository
impl Sync for PostgresJobRepository
impl Unpin for PostgresJobRepository
impl UnsafeUnpin for PostgresJobRepository
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more