pub trait MessageStorage: Send + Sync {
// Required methods
fn store_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 FipaMessage,
) -> Pin<Box<dyn Future<Output = Result<(), RouterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_message<'life0, 'async_trait>(
&'life0 self,
message_id: MessageId,
) -> Pin<Box<dyn Future<Output = Result<Option<FipaMessage>, RouterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_message<'life0, 'async_trait>(
&'life0 self,
message_id: MessageId,
) -> Pin<Box<dyn Future<Output = Result<(), RouterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_agent_messages<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<FipaMessage>, RouterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Storage interface for persistence operations
Required Methods§
Sourcefn store_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 FipaMessage,
) -> Pin<Box<dyn Future<Output = Result<(), RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 FipaMessage,
) -> Pin<Box<dyn Future<Output = Result<(), RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persists a message for delivery guarantees
Sourcefn get_message<'life0, 'async_trait>(
&'life0 self,
message_id: MessageId,
) -> Pin<Box<dyn Future<Output = Result<Option<FipaMessage>, RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_message<'life0, 'async_trait>(
&'life0 self,
message_id: MessageId,
) -> Pin<Box<dyn Future<Output = Result<Option<FipaMessage>, RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves a stored message by ID
Sourcefn remove_message<'life0, 'async_trait>(
&'life0 self,
message_id: MessageId,
) -> Pin<Box<dyn Future<Output = Result<(), RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_message<'life0, 'async_trait>(
&'life0 self,
message_id: MessageId,
) -> Pin<Box<dyn Future<Output = Result<(), RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes a message after successful delivery
Sourcefn list_agent_messages<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<FipaMessage>, RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_agent_messages<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentId,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<FipaMessage>, RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists messages for a specific agent (for queue management)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".