pub struct MemoryBackend { /* private fields */ }Expand description
Thread-safe in-memory implementation of StorageBackend.
Ideal for unit testing, ephemeral workloads, and local development without external database servers.
Implementations§
Source§impl MemoryBackend
impl MemoryBackend
Sourcepub fn new() -> MemoryBackend
pub fn new() -> MemoryBackend
Creates a new, empty MemoryBackend.
Trait Implementations§
Source§impl Clone for MemoryBackend
impl Clone for MemoryBackend
Source§fn clone(&self) -> MemoryBackend
fn clone(&self) -> MemoryBackend
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 MemoryBackend
impl Debug for MemoryBackend
Source§impl Default for MemoryBackend
impl Default for MemoryBackend
Source§fn default() -> MemoryBackend
fn default() -> MemoryBackend
Returns the “default value” for a type. Read more
Source§impl ObservabilityBackend for MemoryBackend
impl ObservabilityBackend for MemoryBackend
fn explain_job<'life0, 'async_trait>(
&'life0 self,
job_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<JobExplanation>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn queue_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
queue: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueueMetrics>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Source§impl StorageBackend for MemoryBackend
impl StorageBackend for MemoryBackend
Source§fn capabilities(&self) -> BackendCapabilities
fn capabilities(&self) -> BackendCapabilities
Declares this backend’s storage and coordination capabilities.
Source§fn as_stream(&self) -> Option<&dyn StreamBackend>
fn as_stream(&self) -> Option<&dyn StreamBackend>
Returns reference to StreamBackend if supported by this storage implementation.
Source§fn as_observability(&self) -> Option<&dyn ObservabilityBackend>
fn as_observability(&self) -> Option<&dyn ObservabilityBackend>
Returns reference to backend-native observability data if supported.
Source§fn run_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn run_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
Executes backend schema migrations or setup steps.
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
Performs a health check to verify backend connectivity and readiness.
Source§fn enqueue<'life0, 'async_trait>(
&'life0 self,
job: NewJob,
) -> Pin<Box<dyn Future<Output = Result<Uuid, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn enqueue<'life0, 'async_trait>(
&'life0 self,
job: NewJob,
) -> Pin<Box<dyn Future<Output = Result<Uuid, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
Enqueues a new job into the backend queue.
Source§fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
queue: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = ()> + Send>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
queue: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = ()> + Send>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Subscribes to job enqueue notification events for a specific queue.
Source§fn lease_jobs_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
worker_id: &'life2 str,
lease_seconds: i64,
batch_size: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
fn lease_jobs_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
worker_id: &'life2 str,
lease_seconds: i64,
batch_size: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
Leases up to
batch_size runnable jobs for a specified worker ID.Source§fn lease_jobs_batch_with_ordering<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
worker_id: &'life2 str,
lease_seconds: i64,
batch_size: i64,
ordering: QueueOrdering,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
fn lease_jobs_batch_with_ordering<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
worker_id: &'life2 str,
lease_seconds: i64,
batch_size: i64,
ordering: QueueOrdering,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
Leases up to
batch_size runnable jobs with specified queue ordering preference (QueueOrdering).Source§fn reap_expired_locks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn reap_expired_locks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
Reaps expired locks from inactive workers, resetting their status back to queued.
Source§fn start_attempts_batch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_dataset_ids: &'life1 [String],
job_ids: &'life2 [Uuid],
worker_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Uuid, Uuid, i32)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MemoryBackend: 'async_trait,
fn start_attempts_batch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_dataset_ids: &'life1 [String],
job_ids: &'life2 [Uuid],
worker_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Uuid, Uuid, i32)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MemoryBackend: 'async_trait,
Starts job execution attempt records, returning
(job_id, attempt_id, attempt_number) tuples.Source§fn mark_succeeded<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
_worker_id: &'life1 str,
latency_ms: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn mark_succeeded<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
_worker_id: &'life1 str,
latency_ms: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Marks a single job execution attempt as succeeded.
Source§fn mark_succeeded_batch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_dataset_id: &'life1 str,
updates: &'life2 [(Uuid, Uuid, i32)],
worker_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MemoryBackend: 'async_trait,
fn mark_succeeded_batch<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_dataset_id: &'life1 str,
updates: &'life2 [(Uuid, Uuid, i32)],
worker_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MemoryBackend: 'async_trait,
Marks a batch of job execution attempts as succeeded.
Source§fn reschedule_for_retry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
_worker_id: &'life1 str,
latency_ms: i32,
next_run_at: DateTime<Utc>,
error_code: &'life2 str,
error_message: &'life3 str,
_attempt_no: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MemoryBackend: 'async_trait,
fn reschedule_for_retry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
_worker_id: &'life1 str,
latency_ms: i32,
next_run_at: DateTime<Utc>,
error_code: &'life2 str,
error_message: &'life3 str,
_attempt_no: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
MemoryBackend: 'async_trait,
Records a failed attempt and reschedules the job for a future retry attempt.
Source§fn mark_dlq<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
_worker_id: &'life1 str,
latency_ms: i32,
reason_code: &'life2 str,
error_code: &'life3 str,
error_message: &'life4 str,
_attempt_no: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
MemoryBackend: 'async_trait,
fn mark_dlq<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
_worker_id: &'life1 str,
latency_ms: i32,
reason_code: &'life2 str,
error_code: &'life3 str,
error_message: &'life4 str,
_attempt_no: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
MemoryBackend: 'async_trait,
Records a failed attempt and transitions the job to the Dead-Letter Queue (DLQ).
Source§fn archive_succeeded_older_than<'life0, 'async_trait>(
&'life0 self,
cutoff: DateTime<Utc>,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn archive_succeeded_older_than<'life0, 'async_trait>(
&'life0 self,
cutoff: DateTime<Utc>,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
Moves succeeded jobs older than
cutoff into an archive table or storage location.Source§fn delete_history_for_succeeded_older_than<'life0, 'async_trait>(
&'life0 self,
cutoff: DateTime<Utc>,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<(u64, u64), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn delete_history_for_succeeded_older_than<'life0, 'async_trait>(
&'life0 self,
cutoff: DateTime<Utc>,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<(u64, u64), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
Prunes attempt audit logs and decision records for succeeded jobs older than
cutoff.Source§fn perform_maintenance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn perform_maintenance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
Performs database maintenance (e.g., VACUUM ANALYZE in Postgres, PRAGMA incremental_vacuum in SQLite).
Source§fn extend_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
worker_id: &'life1 str,
lease_seconds: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn extend_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
worker_id: &'life1 str,
lease_seconds: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Extends the lease lock expiration for an in-flight running job.
Returns
true if the lease was extended, false if the job lock was lost or reaped.Source§fn cancel_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
worker_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn cancel_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
worker_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Cancels a queued/scheduled job or a running job owned by
worker_id. Read moreSource§fn get_job<'life0, 'async_trait>(
&'life0 self,
job_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
fn get_job<'life0, 'async_trait>(
&'life0 self,
job_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
MemoryBackend: 'async_trait,
Fetches a single job record by ID.
Source§fn list_jobs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: Option<&'life1 str>,
status: Option<&'life2 str>,
limit: i64,
cursor_created_at: Option<DateTime<Utc>>,
cursor_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobListItem>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
fn list_jobs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: Option<&'life1 str>,
status: Option<&'life2 str>,
limit: i64,
cursor_created_at: Option<DateTime<Utc>>,
cursor_id: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobListItem>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
Fetches a list of jobs matching filters with cursor pagination.
Source§fn replay_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
override_queue: Option<&'life1 str>,
override_run_at: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<Uuid, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn replay_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
override_queue: Option<&'life1 str>,
override_run_at: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<Uuid, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Atomically replays a job by ID into the queue.
Source§fn semantic_capabilities(&self) -> Option<BackendSemanticCapabilities>
fn semantic_capabilities(&self) -> Option<BackendSemanticCapabilities>
Declares detailed semantic strength for this backend. Read more
Source§fn dequeue_and_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
worker_id: &'life2 str,
lease_seconds: i64,
batch_size: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn dequeue_and_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
worker_id: &'life2 str,
lease_seconds: i64,
batch_size: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Dequeues and leases up to
batch_size runnable jobs (alias for lease_jobs_batch).Source§fn complete_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
worker_id: &'life1 str,
latency_ms: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn complete_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
worker_id: &'life1 str,
latency_ms: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Marks a job attempt as completed (alias for
mark_succeeded).Source§fn retry_job<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
worker_id: &'life1 str,
latency_ms: i32,
next_run_at: DateTime<Utc>,
error_code: &'life2 str,
error_message: &'life3 str,
attempt_no: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn retry_job<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
worker_id: &'life1 str,
latency_ms: i32,
next_run_at: DateTime<Utc>,
error_code: &'life2 str,
error_message: &'life3 str,
attempt_no: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Reschedules a job for retry (alias for
reschedule_for_retry).Source§fn fail_job<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
worker_id: &'life1 str,
latency_ms: i32,
reason_code: &'life2 str,
error_code: &'life3 str,
error_message: &'life4 str,
attempt_no: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn fail_job<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
job_id: Uuid,
attempt_id: Uuid,
worker_id: &'life1 str,
latency_ms: i32,
reason_code: &'life2 str,
error_code: &'life3 str,
error_message: &'life4 str,
attempt_no: i32,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Moves a job to DLQ on failure (alias for
mark_dlq).Source§impl StreamBackend for MemoryBackend
impl StreamBackend for MemoryBackend
Source§fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 str,
event: NewEvent,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 str,
event: NewEvent,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Appends a new event to the specified stream log, returning its assigned sequence number.
Source§fn subscribe_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stream: &'life1 str,
_consumer_group: &'life2 str,
_last_seq: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = ()> + Send>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
fn subscribe_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stream: &'life1 str,
_consumer_group: &'life2 str,
_last_seq: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = ()> + Send>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
Subscribes to notification events when new entries are appended to a stream.
Source§fn ack<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stream: &'life1 str,
consumer_group: &'life2 str,
seq: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
fn ack<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stream: &'life1 str,
consumer_group: &'life2 str,
seq: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MemoryBackend: 'async_trait,
Acknowledges event processing up to
seq for a consumer group on a stream log.Source§fn read_events<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 str,
after_seq: i64,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn read_events<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 str,
after_seq: i64,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Reads events from a stream with sequence numbers strictly greater than
after_seq.Source§fn prune_events<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 str,
through_seq: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn prune_events<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 str,
through_seq: i64,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Source§fn consumer_group_info<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConsumerGroupStatus>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
fn consumer_group_info<'life0, 'life1, 'async_trait>(
&'life0 self,
stream: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConsumerGroupStatus>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
MemoryBackend: 'async_trait,
Fetches consumer group offset status for a stream log.
Source§fn read_next<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stream: &'life1 str,
consumer_group: &'life2 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn read_next<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stream: &'life1 str,
consumer_group: &'life2 str,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Reads the next events for a consumer group from its durable acknowledged offset.
Auto Trait Implementations§
impl Freeze for MemoryBackend
impl RefUnwindSafe for MemoryBackend
impl Send for MemoryBackend
impl Sync for MemoryBackend
impl Unpin for MemoryBackend
impl UnsafeUnpin for MemoryBackend
impl UnwindSafe for MemoryBackend
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