Skip to main content

RuntimeMessageStore

Trait RuntimeMessageStore 

Source
pub trait RuntimeMessageStore:
    MessageRetriever
    + Send
    + Sync {
    // Required methods
    fn add_input_message<'life0, 'async_trait>(
        &'life0 self,
        session_id: SessionId,
        input: InputMessage,
    ) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store_message<'life0, 'async_trait>(
        &'life0 self,
        session_id: SessionId,
        message: Message,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Message store contract for runtime persistence and lookup.

Required Methods§

Source

fn add_input_message<'life0, 'async_trait>( &'life0 self, session_id: SessionId, input: InputMessage, ) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Store a new input message and return the generated message record.

Source

fn store_message<'life0, 'async_trait>( &'life0 self, session_id: SessionId, message: Message, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Persist an existing message record.

Implementations on Foreign Types§

Source§

impl RuntimeMessageStore for InMemoryMessageRetriever

Source§

fn add_input_message<'life0, 'async_trait>( &'life0 self, session_id: SessionId, input: InputMessage, ) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn store_message<'life0, 'async_trait>( &'life0 self, session_id: SessionId, message: Message, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§