pub struct FileSessionInbox { /* private fields */ }Expand description
Filesystem SessionInbox implementation. Clone/share one instance per runtime so concurrent senders serialize only the small generation/backlog transaction for their target session.
Implementations§
Source§impl FileSessionInbox
impl FileSessionInbox
pub fn new( sessions: Arc<SessionStoreV2>, limits: SessionInboxLimits, ) -> FileSessionInbox
pub fn limits(&self) -> SessionInboxLimits
Trait Implementations§
Source§impl Clone for FileSessionInbox
impl Clone for FileSessionInbox
Source§fn clone(&self) -> FileSessionInbox
fn clone(&self) -> FileSessionInbox
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 SessionInboxPort for FileSessionInbox
impl SessionInboxPort for FileSessionInbox
fn deliver<'life0, 'life1, 'async_trait>(
&'life0 self,
envelope: &'life1 SessionMessageEnvelope,
) -> Pin<Box<dyn Future<Output = Result<SessionInboxReceipt, SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileSessionInbox: 'async_trait,
Source§fn mark_activation_eligible<'life0, 'life1, 'async_trait>(
&'life0 self,
target_session_id: &'life1 str,
generation: u64,
policy: SessionActivationPolicy,
) -> Pin<Box<dyn Future<Output = Result<(), SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileSessionInbox: 'async_trait,
fn mark_activation_eligible<'life0, 'life1, 'async_trait>(
&'life0 self,
target_session_id: &'life1 str,
generation: u64,
policy: SessionActivationPolicy,
) -> Pin<Box<dyn Future<Output = Result<(), SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileSessionInbox: 'async_trait,
Durably authorize execution for the queue prefix through
generation. Read morefn claim<'life0, 'life1, 'async_trait>(
&'life0 self,
target_session_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionInboxClaim>, SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileSessionInbox: 'async_trait,
Source§fn was_admitted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_session_id: &'life1 str,
id: &'life2 SessionMessageId,
) -> Pin<Box<dyn Future<Output = Result<bool, SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
FileSessionInbox: 'async_trait,
fn was_admitted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_session_id: &'life1 str,
id: &'life2 SessionMessageId,
) -> Pin<Box<dyn Future<Output = Result<bool, SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
FileSessionInbox: 'async_trait,
Permanent durable receipt check. Unlike the bounded in-session cursor,
this tombstone must remain true for the lifetime of the logical inbox.
Source§fn ack<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_session_id: &'life1 str,
claim: &'life2 SessionInboxClaim,
) -> Pin<Box<dyn Future<Output = Result<(), SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
FileSessionInbox: 'async_trait,
fn ack<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_session_id: &'life1 str,
claim: &'life2 SessionInboxClaim,
) -> Pin<Box<dyn Future<Output = Result<(), SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
FileSessionInbox: 'async_trait,
Persist the permanent admitted-id receipt, then remove the claimed
queue item. Callers may invoke this only after the transcript checkpoint
containing the same id is durable.
fn inspect<'life0, 'life1, 'async_trait>(
&'life0 self,
target_session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<SessionInboxBacklog, SessionInboxError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileSessionInbox: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for FileSessionInbox
impl !UnwindSafe for FileSessionInbox
impl Freeze for FileSessionInbox
impl Send for FileSessionInbox
impl Sync for FileSessionInbox
impl Unpin for FileSessionInbox
impl UnsafeUnpin for FileSessionInbox
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