pub struct Sqlite {
pub pool: SqlitePool,
}Fields§
§pool: SqlitePoolTrait Implementations§
Source§impl Database for Sqlite
impl Database for Sqlite
Source§fn change_user_password<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: i64,
new_password: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn change_user_password<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: i64,
new_password: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Change user’s password.
Source§fn get_database_driver(&self) -> Driver
fn get_database_driver(&self) -> Driver
fn new<'life0, 'async_trait>(
database_url: &'life0 str,
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn insert_user_and_get_id<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
username: &'life1 str,
email: &'life2 str,
password_hash: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn insert_user_and_get_id<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
username: &'life1 str,
email: &'life2 str,
password_hash: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
user_id.Source§fn get_user_from_id<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<User, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_from_id<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<User, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
User from user_id.Source§fn get_user_authentication_from_id<'life0, 'async_trait>(
&'life0 self,
user_id: UserId,
) -> Pin<Box<dyn Future<Output = Result<UserAuthentication, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_authentication_from_id<'life0, 'async_trait>(
&'life0 self,
user_id: UserId,
) -> Pin<Box<dyn Future<Output = Result<UserAuthentication, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
UserAuthentication from user_id.Source§fn get_user_profile_from_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<UserProfile, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_profile_from_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<UserProfile, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
UserProfile from username.Source§fn get_user_compact_from_id<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<UserCompact, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_compact_from_id<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<UserCompact, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
UserCompact from user_id.Source§fn get_user_tracker_key<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Option<TrackerKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_tracker_key<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Option<TrackerKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
TrackerKey.Source§fn count_users<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_users<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn ban_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: i64,
reason: &'life1 str,
date_expiry: NaiveDateTime,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ban_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: i64,
reason: &'life1 str,
date_expiry: NaiveDateTime,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
user_id, reason and date_expiry.Source§fn grant_admin_role<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn grant_admin_role<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn verify_email<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_email<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
user_id.Source§fn add_tracker_key<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: i64,
tracker_key: &'life1 TrackerKey,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_tracker_key<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: i64,
tracker_key: &'life1 TrackerKey,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
TrackerKey to a certain user with user_id.Source§fn delete_user<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_user<'life0, 'async_trait>(
&'life0 self,
user_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
user_id.Source§fn insert_category_and_get_id<'life0, 'life1, 'async_trait>(
&'life0 self,
category_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_category_and_get_id<'life0, 'life1, 'async_trait>(
&'life0 self,
category_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
category_id.Source§fn get_category_from_id<'life0, 'async_trait>(
&'life0 self,
category_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Category, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_category_from_id<'life0, 'async_trait>(
&'life0 self,
category_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Category, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Category from category_id.Source§fn get_category_from_name<'life0, 'life1, 'async_trait>(
&'life0 self,
category_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Category, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_category_from_name<'life0, 'life1, 'async_trait>(
&'life0 self,
category_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Category, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Category from category_name.Source§fn get_categories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Category>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_categories<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Category>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vec<Category>.Source§fn delete_category<'life0, 'life1, 'async_trait>(
&'life0 self,
category_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_category<'life0, 'life1, 'async_trait>(
&'life0 self,
category_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
category_name.Source§fn get_torrents_search_sorted_paginated<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
search: &'life1 Option<String>,
categories: &'life2 Option<Vec<String>>,
tags: &'life3 Option<Vec<String>>,
sort: &'life4 Sorting,
offset: u64,
limit: u8,
) -> Pin<Box<dyn Future<Output = Result<TorrentsResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn get_torrents_search_sorted_paginated<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
search: &'life1 Option<String>,
categories: &'life2 Option<Vec<String>>,
tags: &'life3 Option<Vec<String>>,
sort: &'life4 Sorting,
offset: u64,
limit: u8,
) -> Pin<Box<dyn Future<Output = Result<TorrentsResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
TorrentsResponse from search, categories, sort, offset and page_size.Source§fn insert_torrent_and_get_id<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
original_info_hash: &'life1 InfoHash,
torrent: &'life2 Torrent,
uploader_id: UserId,
metadata: &'life3 Metadata,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn insert_torrent_and_get_id<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
original_info_hash: &'life1 InfoHash,
torrent: &'life2 Torrent,
uploader_id: UserId,
metadata: &'life3 Metadata,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
torrent_id with torrent, uploader_id, category_id, title and description.Source§fn get_torrent_canonical_info_hash_group<'life0, 'life1, 'async_trait>(
&'life0 self,
canonical: &'life1 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<CanonicalInfoHashGroup, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_torrent_canonical_info_hash_group<'life0, 'life1, 'async_trait>(
&'life0 self,
canonical: &'life1 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<CanonicalInfoHashGroup, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn find_canonical_info_hash_for<'life0, 'life1, 'async_trait>(
&'life0 self,
info_hash: &'life1 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<Option<InfoHash>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_canonical_info_hash_for<'life0, 'life1, 'async_trait>(
&'life0 self,
info_hash: &'life1 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<Option<InfoHash>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
CanonicalInfoHashGroup the info-hash belongs to, if
the info-hash belongs to a group. Otherwise, returns None. Read moreSource§fn add_info_hash_to_canonical_info_hash_group<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original: &'life1 InfoHash,
canonical: &'life2 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_info_hash_to_canonical_info_hash_group<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
original: &'life1 InfoHash,
canonical: &'life2 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn get_torrent_info_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<DbTorrent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_torrent_info_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<DbTorrent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
DbTorrentInfo from torrent_id.Source§fn get_torrent_info_from_info_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
info_hash: &'life1 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<DbTorrent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_torrent_info_from_info_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
info_hash: &'life1 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<DbTorrent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
DbTorrentInfo from torrent InfoHash.Source§fn get_torrent_files_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentFile>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_torrent_files_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentFile>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vec<TorrentFile> from torrent_id.Source§fn get_torrent_announce_urls_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<String>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_torrent_announce_urls_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<String>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vec<Vec<String>> from torrent_id.Source§fn get_torrent_http_seed_urls_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_torrent_http_seed_urls_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vec<Vec<String>> from torrent_id.Source§fn get_torrent_nodes_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, i64)>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_torrent_nodes_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, i64)>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vec<(String, i64)> from torrent_id.Source§fn get_torrent_listing_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<TorrentListing, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_torrent_listing_from_id<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<TorrentListing, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
TorrentListing from torrent_id.Source§fn get_torrent_listing_from_info_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
info_hash: &'life1 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<TorrentListing, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_torrent_listing_from_info_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
info_hash: &'life1 InfoHash,
) -> Pin<Box<dyn Future<Output = Result<TorrentListing, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
TorrentListing from InfoHash.Source§fn get_all_torrents_compact<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentCompact>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_torrents_compact<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentCompact>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vec<TorrentCompact>.Source§fn get_torrents_with_stats_not_updated_since<'life0, 'async_trait>(
&'life0 self,
datetime: DateTime<Utc>,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentCompact>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_torrents_with_stats_not_updated_since<'life0, 'async_trait>(
&'life0 self,
datetime: DateTime<Utc>,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<TorrentCompact>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn update_torrent_title<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent_id: i64,
title: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_torrent_title<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent_id: i64,
title: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
torrent_id and title.Source§fn update_torrent_description<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent_id: i64,
description: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_torrent_description<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent_id: i64,
description: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
torrent_id and description.Source§fn update_torrent_category<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
category_id: CategoryId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_torrent_category<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
category_id: CategoryId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
torrent_id and category_id.Source§fn insert_tag_and_get_id<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_tag_and_get_id<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn delete_tag<'life0, 'async_trait>(
&'life0 self,
tag_id: TagId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_tag<'life0, 'async_trait>(
&'life0 self,
tag_id: TagId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn add_torrent_tag_link<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
tag_id: TagId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_torrent_tag_link<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
tag_id: TagId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn add_torrent_tag_links<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent_id: i64,
tag_ids: &'life1 [TagId],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_torrent_tag_links<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent_id: i64,
tag_ids: &'life1 [TagId],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn delete_torrent_tag_link<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
tag_id: TagId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_torrent_tag_link<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
tag_id: TagId,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn delete_all_torrent_tag_links<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_all_torrent_tag_links<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_tag_from_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TorrentTag, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tag_from_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TorrentTag, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Vec<TorrentTag>.torrent_id.Source§fn update_tracker_info<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent_id: i64,
tracker_url: &'life1 Url,
seeders: i64,
leechers: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_tracker_info<'life0, 'life1, 'async_trait>(
&'life0 self,
torrent_id: i64,
tracker_url: &'life1 Url,
seeders: i64,
leechers: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
torrent_id, tracker_url, seeders and leechers.Source§fn delete_torrent<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_torrent<'life0, 'async_trait>(
&'life0 self,
torrent_id: i64,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
torrent_id.Source§fn delete_all_database_rows<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_all_database_rows<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for Sqlite
impl !RefUnwindSafe for Sqlite
impl Send for Sqlite
impl Sync for Sqlite
impl Unpin for Sqlite
impl !UnwindSafe for Sqlite
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
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>
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>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);