Skip to main content

SearchHistoryDb

Trait SearchHistoryDb 

Source
pub trait SearchHistoryDb: Send + Sync {
    // Required methods
    fn log_query<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        query_text: &'life1 str,
        query_type: &'life2 str,
        user_id: Option<Uuid>,
    ) -> Pin<Box<dyn Future<Output = Result<Uuid, DatabaseError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
    fn log_result<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query_id: Uuid,
        serialized_result: &'life1 str,
        user_id: Option<Uuid>,
    ) -> Pin<Box<dyn Future<Output = Result<Uuid, DatabaseError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_history<'life0, 'async_trait>(
        &'life0 self,
        user_id: Option<Uuid>,
        limit: Option<usize>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchHistoryEntry>, DatabaseError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

Source

fn log_query<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, query_text: &'life1 str, query_type: &'life2 str, user_id: Option<Uuid>, ) -> Pin<Box<dyn Future<Output = Result<Uuid, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Source

fn log_result<'life0, 'life1, 'async_trait>( &'life0 self, query_id: Uuid, serialized_result: &'life1 str, user_id: Option<Uuid>, ) -> Pin<Box<dyn Future<Output = Result<Uuid, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_history<'life0, 'async_trait>( &'life0 self, user_id: Option<Uuid>, limit: Option<usize>, ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchHistoryEntry>, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§