pub struct FlashpointArchive { /* private fields */ }Implementations§
Source§impl FlashpointArchive
impl FlashpointArchive
pub fn new() -> Self
Sourcepub fn load_database(&mut self, source: &str) -> Result<(), Error>
pub fn load_database(&mut self, source: &str) -> Result<(), Error>
Load a new database for Flashpoint. Open databases will close.
source - Path to database file, or :memory: to open a fresh database in memory
pub fn parse_user_input(&self, input: &str) -> ParsedInput
pub fn register_extension(&mut self, ext: ExtensionInfo) -> Result<(), Error>
pub async fn search_games( &self, search: &GameSearch, ) -> Result<Vec<Game>, Error>
pub async fn search_games_index( &self, search: &mut GameSearch, limit: Option<i64>, ) -> Result<Vec<PageTuple>, Error>
pub async fn search_games_total( &self, search: &GameSearch, ) -> Result<i64, Error>
pub async fn search_games_with_tag(&self, tag: &str) -> Result<Vec<Game>, Error>
pub async fn search_games_random( &self, search: &GameSearch, count: i64, ) -> Result<Vec<Game>, Error>
pub async fn search_tag_suggestions( &self, partial: &str, blacklist: Vec<String>, ) -> Result<Vec<TagSuggestion>, Error>
pub async fn search_platform_suggestions( &self, partial: &str, ) -> Result<Vec<TagSuggestion>, Error>
pub async fn find_all_game_ids(&self) -> Result<Vec<String>, Error>
pub async fn find_game(&self, id: &str) -> Result<Option<Game>, Error>
pub async fn create_game( &self, partial_game: &PartialGame, ) -> Result<Game, Error>
pub async fn save_game( &self, partial_game: &mut PartialGame, ) -> Result<Game, Error>
pub async fn save_games( &self, partial_games: Vec<&mut PartialGame>, ) -> Result<(), Error>
pub async fn delete_game(&self, id: &str) -> Result<(), Error>
pub async fn count_games(&self) -> Result<i64, Error>
pub async fn find_add_app_by_id( &self, id: &str, ) -> Result<Option<AdditionalApp>, Error>
pub async fn create_add_app( &self, add_app: &mut AdditionalApp, ) -> Result<(), Error>
pub async fn find_game_data_by_id( &self, game_data_id: i64, ) -> Result<Option<GameData>, Error>
pub async fn find_game_data( &self, game_id: &str, ) -> Result<Vec<GameData>, Error>
pub async fn create_game_data( &self, game_data: &PartialGameData, ) -> Result<GameData, Error>
pub async fn save_game_data( &self, game_data: &PartialGameData, ) -> Result<GameData, Error>
pub async fn delete_game_data(&self, id: i64) -> Result<(), Error>
pub async fn find_tag(&self, name: &str) -> Result<Option<Tag>, Error>
pub async fn find_tag_by_id(&self, id: i64) -> Result<Option<Tag>, Error>
pub async fn create_tag( &self, name: &str, category: Option<String>, id: Option<i64>, ) -> Result<Tag, Error>
pub async fn save_tag(&self, partial: &mut PartialTag) -> Result<Tag, Error>
pub async fn delete_tag(&self, name: &str) -> Result<(), Error>
pub async fn delete_tag_by_id(&self, id: i64) -> Result<(), Error>
pub async fn find_all_platforms(&self) -> Result<Vec<Tag>, Error>
pub async fn find_platform(&self, name: &str) -> Result<Option<Tag>, Error>
pub async fn find_platform_by_id(&self, id: i64) -> Result<Option<Tag>, Error>
pub async fn create_platform( &self, name: &str, id: Option<i64>, ) -> Result<Tag, Error>
pub async fn save_platform( &self, partial: &mut PartialTag, ) -> Result<Tag, Error>
pub async fn delete_platform(&self, name: &str) -> Result<(), Error>
pub async fn count_platforms(&self) -> Result<i64, Error>
pub async fn find_all_tag_categories(&self) -> Result<Vec<TagCategory>, Error>
pub async fn find_tag_category( &self, name: &str, ) -> Result<Option<TagCategory>, Error>
pub async fn find_tag_category_by_id( &self, id: i64, ) -> Result<Option<TagCategory>, Error>
pub async fn create_tag_category( &self, partial: &PartialTagCategory, ) -> Result<TagCategory, Error>
pub async fn save_tag_category( &self, partial: &PartialTagCategory, ) -> Result<TagCategory, Error>
pub async fn new_tag_filter_index( &self, search: &mut GameSearch, ) -> Result<(), Error>
pub async fn find_all_game_developers( &self, search: Option<GameSearch>, ) -> Result<Vec<String>, Error>
pub async fn find_all_game_publishers( &self, search: Option<GameSearch>, ) -> Result<Vec<String>, Error>
pub async fn find_all_game_series( &self, search: Option<GameSearch>, ) -> Result<Vec<String>, Error>
pub async fn find_all_game_libraries(&self) -> Result<Vec<String>, Error>
pub async fn find_all_game_statuses(&self) -> Result<Vec<String>, Error>
pub async fn find_all_game_play_modes(&self) -> Result<Vec<String>, Error>
pub async fn find_all_game_application_paths( &self, ) -> Result<Vec<String>, Error>
pub async fn find_platform_app_paths( &self, ) -> Result<HashMap<String, Vec<PlatformAppPath>>, Error>
pub async fn add_game_playtime( &self, game_id: &str, seconds: i64, ) -> Result<(), Error>
pub async fn clear_playtime_tracking_by_id( &self, game_id: &str, ) -> Result<(), Error>
pub async fn clear_playtime_tracking(&self) -> Result<(), Error>
pub async fn force_games_active_data_most_recent(&self) -> Result<(), Error>
pub async fn find_game_redirects(&self) -> Result<Vec<GameRedirect>, Error>
pub async fn create_game_redirect( &self, src_id: &str, dest_id: &str, ) -> Result<(), Error>
pub async fn delete_game_redirect( &self, src_id: &str, dest_id: &str, ) -> Result<(), Error>
pub async fn update_apply_categories( &self, cats: Vec<RemoteCategory>, ) -> Result<(), Error>
pub async fn update_apply_platforms( &self, platforms: Vec<RemotePlatform>, ) -> Result<(), Error>
pub async fn update_apply_games( &self, games_res: &RemoteGamesRes, owner: &str, ) -> Result<(), Error>
pub async fn update_delete_games( &self, games_res: &RemoteDeletedGamesRes, ) -> Result<(), Error>
pub async fn update_apply_redirects( &self, redirects_res: Vec<GameRedirect>, ) -> Result<(), Error>
pub async fn optimize_database(&self) -> Result<(), Error>
pub async fn new_custom_id_order( &self, custom_id_order: Vec<String>, ) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for FlashpointArchive
impl !RefUnwindSafe for FlashpointArchive
impl !UnwindSafe for FlashpointArchive
impl Send for FlashpointArchive
impl Sync for FlashpointArchive
impl Unpin for FlashpointArchive
impl UnsafeUnpin for FlashpointArchive
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