pub struct Database { /* private fields */ }Implementations§
Trait Implementations§
Source§impl DbProvider for Database
impl DbProvider for Database
fn get_total_unique_cached_crates<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_cached_crate_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_cached_downloads<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn authenticate_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
pwd: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<User>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn increase_download_counter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
crate_version: &'life2 Version,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn increase_cached_download_counter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
crate_version: &'life2 Version,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_last_updated_crate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<Option<(OriginalName, Version)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<(String, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_session_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
session_token: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_crate_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_crate_group<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
group: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_group_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_name: &'life1 str,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_owner<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
owner: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn is_download_restricted<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn change_download_restricted<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
restricted: bool,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_crate_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn is_crate_group<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
group: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn is_crate_group_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn is_group_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_name: &'life1 str,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn is_owner<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_crate_id<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<Option<i64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_crate_owners<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<User>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_crate_users<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<User>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_crate_groups<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<Group>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_group_users<'life0, 'life1, 'async_trait>(
&'life0 self,
group_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<User>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_crate_versions<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<Version>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_session_token<'life0, 'life1, 'async_trait>(
&'life0 self,
session_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_group<'life0, 'life1, 'async_trait>(
&'life0 self,
group_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn change_pwd<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
new_pwd: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn change_read_only_state<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
state: bool,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn change_admin_state<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
state: bool,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn crate_version_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_id: i64,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_max_version_from_id<'life0, 'async_trait>(
&'life0 self,
crate_id: i64,
) -> Pin<Box<dyn Future<Output = DbResult<Version>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_max_version_from_name<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<Version>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_max_version<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_id: i64,
version: &'life1 Version,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_auth_token<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
token: &'life2 str,
user: &'life3 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_user_from_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<User>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<User>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_group<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<Group>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_auth_tokens<'life0, 'life1, 'async_trait>(
&'life0 self,
user_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<AuthToken>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_auth_token<'life0, 'async_trait>(
&'life0 self,
id: i32,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_owner<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 str,
owner: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_crate_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 str,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_crate_group<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
group: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_group_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_name: &'life1 str,
user: &'life2 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
pwd: &'life2 str,
salt: &'life3 str,
is_admin: bool,
is_read_only: bool,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn add_group<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_users<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<User>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_groups<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<Group>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_unique_crates<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_crate_versions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_downloads<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_top_crates_downloads<'life0, 'async_trait>(
&'life0 self,
top: u32,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<(String, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_crate_summaries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<CrateSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_doc_queue<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
krate: &'life1 NormalizedName,
version: &'life2 Version,
path: &'life3 Path,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete_doc_queue<'life0, 'async_trait>(
&'life0 self,
id: i64,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_doc_queue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<DocQueueEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_crate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
krate: &'life1 NormalizedName,
version: &'life2 Version,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_crate_meta_list<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<CrateMeta>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_last_updated<'life0, 'life1, 'async_trait>(
&'life0 self,
id: i64,
last_updated: &'life1 DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_in_crate_name<'life0, 'life1, 'async_trait>(
&'life0 self,
contains: &'life1 str,
cache: bool,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<CrateOverview>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_crate_overview_list<'life0, 'async_trait>(
&'life0 self,
limit: u64,
offset: u64,
cache: bool,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<CrateOverview>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_crate_data<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
) -> Pin<Box<dyn Future<Output = DbResult<CrateData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_empty_crate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
created: &'life2 DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = DbResult<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_crate<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
pub_metadata: &'life1 PublishMetadata,
cksum: &'life2 str,
created: &'life3 DateTime<Utc>,
owner: &'life4 str,
) -> Pin<Box<dyn Future<Output = DbResult<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn update_docs_link<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
version: &'life2 Version,
docs_link: &'life3 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn add_crate_metadata<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
pub_metadata: &'life1 PublishMetadata,
created: &'life2 str,
crate_id: i64,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_prefetch_data<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<Prefetch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_cratesio_cache_up_to_date<'life0, 'life1, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
etag: Option<String>,
last_modified: Option<String>,
) -> Pin<Box<dyn Future<Output = DbResult<PrefetchState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_cratesio_prefetch_data<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
crate_name: &'life1 OriginalName,
etag: &'life2 str,
last_modified: &'life3 str,
description: Option<String>,
indices: &'life4 [IndexMetadata],
) -> Pin<Box<dyn Future<Output = DbResult<Prefetch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn get_cratesio_index_update_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<CratesioPrefetchMsg>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unyank_crate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
version: &'life2 Version,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn yank_crate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
crate_name: &'life1 NormalizedName,
version: &'life2 Version,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register_webhook<'life0, 'async_trait>(
&'life0 self,
webhook: Webhook,
) -> Pin<Box<dyn Future<Output = DbResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_webhook<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_webhook<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<Webhook>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_all_webhooks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<Webhook>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn add_webhook_queue<'life0, 'async_trait>(
&'life0 self,
event: WebhookEvent,
payload: Value,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_webhook_queue<'life0, 'async_trait>(
&'life0 self,
event: WebhookEvent,
payload: Value,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a new webhook queue entry for each register webhook
matching the given event.
Next_attempt is set to current time,
in order to trigger immediate dispatch.Source§fn get_pending_webhook_queue_entries<'life0, 'async_trait>(
&'life0 self,
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<WebhookQueue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pending_webhook_queue_entries<'life0, 'async_trait>(
&'life0 self,
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<WebhookQueue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Extracts webhook queue entries with
next_attempt at or earlier than provided timestamp.fn update_webhook_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
last_attempt: DateTime<Utc>,
next_attempt: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_webhook_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for Database
impl !RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl !UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more