pub struct FileStore { /* private fields */ }Implementations§
Trait Implementations§
Source§impl MailboxReader for FileStore
impl MailboxReader for FileStore
fn load_mailbox_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_mailbox_state<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxState>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_mailbox_entries<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 MailboxQuery,
) -> Pin<Box<dyn Future<Output = Result<MailboxPage, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl MailboxWriter for FileStore
impl MailboxWriter for FileStore
fn enqueue_mailbox_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 MailboxEntry,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ensure_mailbox_state<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<MailboxState, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn claim_mailbox_entries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mailbox_id: Option<&'life1 str>,
limit: usize,
consumer_id: &'life2 str,
now: u64,
lease_duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
consumer_id: &'life2 str,
now: u64,
lease_duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn ack_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn nack_mailbox_entry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
retry_at: u64,
error: &'life3 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn dead_letter_mailbox_entry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
error: &'life3 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn cancel_mailbox_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn supersede_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
now: u64,
reason: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn cancel_pending_for_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
exclude_entry_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn interrupt_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<MailboxInterrupt, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn extend_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
extension_ms: u64,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn extend_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
extension_ms: u64,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Extend the lease on a claimed entry. Read more
Source§fn purge_terminal_mailbox_entries<'life0, 'async_trait>(
&'life0 self,
older_than: u64,
) -> Pin<Box<dyn Future<Output = Result<usize, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn purge_terminal_mailbox_entries<'life0, 'async_trait>(
&'life0 self,
older_than: u64,
) -> Pin<Box<dyn Future<Output = Result<usize, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete terminal entries older than
older_than (unix millis). Returns count deleted.Source§impl ThreadReader for FileStore
impl ThreadReader for FileStore
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ThreadHead>, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ThreadHead>, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load an Thread and its current version.
Source§fn load_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunRecord>, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunRecord>, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load one run record by run id.
Source§fn list_runs<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 RunQuery,
) -> Pin<Box<dyn Future<Output = Result<RunPage, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_runs<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 RunQuery,
) -> Pin<Box<dyn Future<Output = Result<RunPage, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List runs with optional filtering and pagination.
Source§fn active_run_for_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunRecord>, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn active_run_for_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RunRecord>, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the most recent non-terminal run for a thread, if any.
Source§fn list_threads<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ThreadListQuery,
) -> Pin<Box<dyn Future<Output = Result<ThreadListPage, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_threads<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ThreadListQuery,
) -> Pin<Box<dyn Future<Output = Result<ThreadListPage, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List Thread ids.
Source§fn load_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Thread>, ThreadStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn load_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Thread>, ThreadStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Load an Thread without version info. Convenience wrapper.
Source§fn load_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
query: &'life2 MessageQuery,
) -> Pin<Box<dyn Future<Output = Result<MessagePage, ThreadStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn load_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
query: &'life2 MessageQuery,
) -> Pin<Box<dyn Future<Output = Result<MessagePage, ThreadStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Load paginated messages for an Thread.
Source§fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ThreadStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ThreadStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
List all Thread ids with default paging.
Source§fn list_paginated<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ThreadListQuery,
) -> Pin<Box<dyn Future<Output = Result<ThreadListPage, ThreadStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list_paginated<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ThreadListQuery,
) -> Pin<Box<dyn Future<Output = Result<ThreadListPage, ThreadStoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
List Thread ids with explicit query.
Source§impl ThreadWriter for FileStore
impl ThreadWriter for FileStore
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
thread: &'life1 Thread,
) -> Pin<Box<dyn Future<Output = Result<Committed, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
thread: &'life1 Thread,
) -> Pin<Box<dyn Future<Output = Result<Committed, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new Thread.
Source§fn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
delta: &'life2 ThreadChangeSet,
precondition: VersionPrecondition,
) -> Pin<Box<dyn Future<Output = Result<Committed, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
delta: &'life2 ThreadChangeSet,
precondition: VersionPrecondition,
) -> Pin<Box<dyn Future<Output = Result<Committed, ThreadStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Append an ThreadChangeSet to an existing Thread.
Auto Trait Implementations§
impl Freeze for FileStore
impl RefUnwindSafe for FileStore
impl Send for FileStore
impl Sync for FileStore
impl Unpin for FileStore
impl UnwindSafe for FileStore
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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