pub trait AnalysisStorage: Send + Sync {
// Required methods
fn store_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result: &'life1 AnalysisResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AnalysisResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_analysis<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
analysis_type: Option<&'life2 str>,
since: Option<SystemTime>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AnalysisResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cleanup_old_results<'life0, 'async_trait>(
&'life0 self,
older_than: SystemTime,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Analysis results storage trait
Required Methods§
Sourcefn store_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result: &'life1 AnalysisResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result: &'life1 AnalysisResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store analysis results
Sourcefn load_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AnalysisResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AnalysisResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load analysis results by ID
Sourcefn find_analysis<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
analysis_type: Option<&'life2 str>,
since: Option<SystemTime>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AnalysisResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_analysis<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
analysis_type: Option<&'life2 str>,
since: Option<SystemTime>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AnalysisResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find analysis results by repository and type
Sourcefn delete_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_analysis<'life0, 'life1, 'async_trait>(
&'life0 self,
result_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete analysis results
Sourcefn cleanup_old_results<'life0, 'async_trait>(
&'life0 self,
older_than: SystemTime,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cleanup_old_results<'life0, 'async_trait>(
&'life0 self,
older_than: SystemTime,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clean up old analysis results