pub trait InboxManager: Send + Sync {
// Required methods
fn send_message<'life0, 'life1, 'async_trait>(
&'life0 self,
team: &'life1 str,
message: InboxMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn broadcast<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
team: &'life1 str,
from: &'life2 str,
content: &'life3 str,
members: &'life4 [String],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn read_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn read_unread<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn mark_read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
message_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn poll_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn clear_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait for inbox-based messaging between agents.
Required Methods§
Sourcefn send_message<'life0, 'life1, 'async_trait>(
&'life0 self,
team: &'life1 str,
message: InboxMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_message<'life0, 'life1, 'async_trait>(
&'life0 self,
team: &'life1 str,
message: InboxMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a message to the recipient specified in message.to.
Sourcefn broadcast<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
team: &'life1 str,
from: &'life2 str,
content: &'life3 str,
members: &'life4 [String],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn broadcast<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
team: &'life1 str,
from: &'life2 str,
content: &'life3 str,
members: &'life4 [String],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Broadcast a plain-text message to all members except the sender.
Sourcefn read_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read all messages in an agent’s inbox.
Sourcefn read_unread<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_unread<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read only unread messages in an agent’s inbox.
Sourcefn mark_read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
message_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn mark_read<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
message_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mark a specific message as read.
Sourcefn poll_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn poll_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<InboxMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Poll for new unread messages, blocking up to timeout.
Sourcefn clear_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn clear_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
team: &'life1 str,
agent: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Clear all messages from an agent’s inbox.