pub struct InMemoryInboxStore { /* private fields */ }Expand description
In-memory inbox store implementation
Thread-safe storage using RwLock. Suitable for single-node deployments. For distributed deployments, use Redis-backed implementation.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryInboxStore
impl Default for InMemoryInboxStore
Source§fn default() -> InMemoryInboxStore
fn default() -> InMemoryInboxStore
Returns the “default value” for a type. Read more
Source§impl InboxStore for InMemoryInboxStore
impl InboxStore for InMemoryInboxStore
Source§fn push(&self, execution_id: &ExecutionId, message: InboxMessage)
fn push(&self, execution_id: &ExecutionId, message: InboxMessage)
Push a message to the inbox for a specific execution Read more
Source§fn len(&self, execution_id: &ExecutionId) -> usize
fn len(&self, execution_id: &ExecutionId) -> usize
Get the number of pending messages for an execution
Source§fn has_control_messages(&self, execution_id: &ExecutionId) -> bool
fn has_control_messages(&self, execution_id: &ExecutionId) -> bool
Check if there are any control messages (highest priority) Read more
Source§fn drain_messages(&self, execution_id: &ExecutionId) -> Vec<InboxMessage>
fn drain_messages(&self, execution_id: &ExecutionId) -> Vec<InboxMessage>
Drain all messages for an execution, sorted by priority Read more
Source§fn peek(&self, execution_id: &ExecutionId) -> Option<InboxMessage>
fn peek(&self, execution_id: &ExecutionId) -> Option<InboxMessage>
Peek at the next message without removing it
Source§fn pop(&self, execution_id: &ExecutionId) -> Option<InboxMessage>
fn pop(&self, execution_id: &ExecutionId) -> Option<InboxMessage>
Pop the highest-priority message
Source§fn clear(&self, execution_id: &ExecutionId)
fn clear(&self, execution_id: &ExecutionId)
Clear all messages for an execution
Source§fn is_empty(&self, execution_id: &ExecutionId) -> bool
fn is_empty(&self, execution_id: &ExecutionId) -> bool
Check if there are any pending messages
Auto Trait Implementations§
impl !Freeze for InMemoryInboxStore
impl RefUnwindSafe for InMemoryInboxStore
impl Send for InMemoryInboxStore
impl Sync for InMemoryInboxStore
impl Unpin for InMemoryInboxStore
impl UnsafeUnpin for InMemoryInboxStore
impl UnwindSafe for InMemoryInboxStore
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