Skip to main content

Database

Struct Database 

Source
pub struct Database { /* private fields */ }

Implementations§

Source§

impl Database

Source

pub fn existing(db_con: DatabaseConnection) -> Self

Source

pub async fn new(con: &ConString, max_con: u32) -> Result<Self, DbError>

Trait Implementations§

Source§

impl DbProvider for Database

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

fn increase_download_counter_by<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, crate_name: &'life1 NormalizedName, crate_version: &'life2 Version, count: u64, ) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn increase_cached_download_counter_by<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, crate_name: &'life1 NormalizedName, crate_version: &'life2 Version, count: u64, ) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

fn delete_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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

fn get_total_unique_crates<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DbResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_total_crate_versions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DbResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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,

Source§

fn get_top_crates_downloads<'life0, 'async_trait>( &'life0 self, top: u64, ) -> Pin<Box<dyn Future<Output = DbResult<Vec<(String, u64)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

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,

Extracts webhook queue entries with next_attempt at or earlier than provided timestamp.
Source§

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,

Source§

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,

Source§

fn get_user_by_oauth2_identity<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, issuer: &'life1 str, subject: &'life2 str, ) -> Pin<Box<dyn Future<Output = DbResult<Option<User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Look up a user by their OAuth2 identity (issuer + subject)
Source§

fn create_oauth2_user<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, username: &'life1 str, issuer: &'life2 str, subject: &'life3 str, email: Option<String>, is_admin: bool, is_read_only: bool, ) -> Pin<Box<dyn Future<Output = DbResult<User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a new user from OAuth2 authentication and link their identity
Link an OAuth2 identity to an existing user
Source§

fn store_oauth2_state<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, state: &'life1 str, pkce_verifier: &'life2 str, nonce: &'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,

Store OAuth2 state for CSRF/PKCE verification during auth flow
Source§

fn get_and_delete_oauth2_state<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 str, ) -> Pin<Box<dyn Future<Output = DbResult<Option<OAuth2StateData>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieve and delete OAuth2 state (single use)
Source§

fn cleanup_expired_oauth2_states<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DbResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Clean up expired OAuth2 states (older than 10 minutes)
Source§

fn is_username_available<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = DbResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check if username is available (for OAuth2 auto-provisioning)
Source§

fn add_toolchain<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, version: &'life2 str, date: &'life3 str, channel: Option<String>, ) -> 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,

Add a new toolchain release
Source§

fn add_toolchain_target<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, toolchain_id: i64, target: &'life1 str, storage_path: &'life2 str, hash: &'life3 str, size: i64, ) -> 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,

Add a target archive to an existing toolchain
Source§

fn get_toolchain_by_channel<'life0, 'life1, 'async_trait>( &'life0 self, channel: &'life1 str, ) -> Pin<Box<dyn Future<Output = DbResult<Option<ToolchainWithTargets>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a toolchain by its channel (e.g., “stable”, “nightly”)
Source§

fn get_toolchain_by_version<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, version: &'life2 str, ) -> Pin<Box<dyn Future<Output = DbResult<Option<ToolchainWithTargets>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get a toolchain by name and version
Source§

fn list_toolchains<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DbResult<Vec<ToolchainWithTargets>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all toolchains
Source§

fn delete_toolchain<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, version: &'life2 str, ) -> Pin<Box<dyn Future<Output = DbResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a toolchain and all its targets
Source§

fn delete_toolchain_target<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, version: &'life2 str, target: &'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,

Delete a specific toolchain target
Source§

fn set_channel<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, channel: &'life1 str, name: &'life2 str, version: &'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,

Set a channel to point to a specific toolchain version
Source§

fn get_channels<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = DbResult<Vec<ChannelInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all channels with their current versions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Source§

fn type_name(&self) -> &'static str

Source§

impl<T> AnySync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more