pub trait MailService: Send + Sync {
Show 14 methods
// Required methods
fn create_agent<'life0, 'async_trait>(
&'life0 self,
name: impl 'async_trait + Into<String> + Send,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_agent<'life0, 'async_trait>(
&'life0 self,
id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_agents<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Agent>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_agent_status<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
status: impl 'async_trait + Into<String> + Send,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_agent_by_mailbox<'life0, 'async_trait>(
&'life0 self,
mailbox_id: MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_agent_mailbox<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<Mailbox>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_agent_to_agent<'life0, 'async_trait>(
&'life0 self,
from_agent_id: AgentId,
to_agent_id: AgentId,
subject: impl 'async_trait + Into<String> + Send,
body: impl 'async_trait + Into<String> + Send,
) -> Pin<Box<dyn Future<Output = Result<Mail>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_mailbox_inbox<'life0, 'async_trait>(
&'life0 self,
mailbox_id: MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mail>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_mailbox_outbox<'life0, 'async_trait>(
&'life0 self,
mailbox_id: MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mail>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_recent_mail<'life0, 'async_trait>(
&'life0 self,
mailbox_id: MailboxId,
hours: i64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mail>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn mark_mail_as_read<'life0, 'async_trait>(
&'life0 self,
mail_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Mail>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn mark_mail_as_read_by_short_id<'life0, 'life1, 'async_trait>(
&'life0 self,
short_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Mail>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn check_unread_mail<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(bool, Vec<Mail>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn create_agent<'life0, 'async_trait>(
&'life0 self,
name: impl 'async_trait + Into<String> + Send,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_agent<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agent<'life0, 'async_trait>(
&'life0 self,
id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_agents<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Agent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_agent_status<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
status: impl 'async_trait + Into<String> + Send,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agent_by_mailbox<'life0, 'async_trait>(
&'life0 self,
mailbox_id: MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Agent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agent_mailbox<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<Mailbox>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_agent_to_agent<'life0, 'async_trait>(
&'life0 self,
from_agent_id: AgentId,
to_agent_id: AgentId,
subject: impl 'async_trait + Into<String> + Send,
body: impl 'async_trait + Into<String> + Send,
) -> Pin<Box<dyn Future<Output = Result<Mail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_mailbox_inbox<'life0, 'async_trait>(
&'life0 self,
mailbox_id: MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_mailbox_outbox<'life0, 'async_trait>(
&'life0 self,
mailbox_id: MailboxId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_recent_mail<'life0, 'async_trait>(
&'life0 self,
mailbox_id: MailboxId,
hours: i64,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Mail>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_mail_as_read<'life0, 'async_trait>(
&'life0 self,
mail_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Mail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_mail_as_read_by_short_id<'life0, 'life1, 'async_trait>(
&'life0 self,
short_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Mail>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_unread_mail<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
) -> Pin<Box<dyn Future<Output = Result<(bool, Vec<Mail>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.